When comparing ATS vs LEAN, the Slant community recommends ATS for most people. In the question“What are the best dependently typed languages?” ATS is ranked 3rd while LEAN is ranked 4th. The most important reason people chose ATS is:
ATS has a theorem-proving type system powerful enough to prove that its functions meet their specifications. This happens at compile time with no performance impact at runtime. This can be used to prove that an ATS program doesn't have bugs commonly found in C++ programs, like "this function never leaks memory" or "this program never attempts to divide by zero" or "this buffer never overflows" or to verify pointer arithmetic, etc.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Built-in formal specification
ATS has a theorem-proving type system powerful enough to prove that its functions meet their specifications. This happens at compile time with no performance impact at runtime. This can be used to prove that an ATS program doesn't have bugs commonly found in C++ programs, like "this function never leaks memory" or "this program never attempts to divide by zero" or "this buffer never overflows" or to verify pointer arithmetic, etc.
Pro Free and open-source compiler
The compiler (ATS/Postiats) is GPLv3.
Pro Functional programming
The syntax is ML-like with the usual functional language features like pattern matching and tail-call optimization.
Pro High-performance systems language
ATS works as a low-level systems language. ATS programs have performance and footprint comparable to programs written in C/C++.
Pro Good module system
Similar to Modula-3. This makes ATS a viable choice even for large-scale projects.
Pro Safe concurrency
ATS can prove its concurrent programs have no deadlocks or race conditions.
Pro Interactive tutorial runs in the browser
Lean has a JavaScript version you can try online. (And a faster C++ version you can download.)
Pro Visual Studio Code support
Lean is a Microsoft Research project, so they have their own IDE support.
Pro Emacs support
Pro Metaprogramming occurs in the same language as the theorem proving.
Because the metaprogramming occurs in the same level as the programming, you are able to write automated tactics that depend on mathematical objects you have already defined, and use those tactics to define more objects. It is a very powerful leap forward in automated and interactive theorem proving.
Pro Permissive license
Apache 2.0
Cons
Con No Windows version
But it does run on Cygwin.
