When comparing TypeScript vs ATS, the Slant community recommends TypeScript for most people. In the question“What are the best (productivity-enhancing, well-designed, and concise, rather than just popular or time-tested) programming languages?”TypeScript is ranked 26th while ATS is ranked 45th. The most important reason people chose TypeScript is:

Typescript has optional static typing with support for interfaces and generics, and intelligent type inference.
It makes refactoring large codebases a breeze, and provides many more safeguards for creating stable code.

Pros

Pro

Optional static typing

Typescript has optional static typing with support for interfaces and generics, and intelligent type inference.

It makes refactoring large codebases a breeze, and provides many more safeguards for creating stable code.

Pro

Strict superset of Javascript

Every existing Javascript program is already a valid TypeScript program giving it the best support for existing libraries, which is particularly useful if you need to integrate with an existing Javascript code base.

Pro

Great support for React, integrated typed JSX parsing

Pro

Works well with existing Javascript code

Both can call Javascript code and be called by Javascript code. Making transitioning to the language very easy.

Pro

Works well with Angular 2

Angular 2 is built using TypeScript and applications built using it can make use of that (or not).

Pro

Compiles to very native looking code

Compiles to simple looking Javascript making it easy to understand what is happening and learn the language (if you already know Javascript).

Pro

Ability to do functional programming

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.

Ad

Cons

Con

Too similar to Javascript

Presents some advantages compared to Javascript, but because it is designed to be a superset of Javascript, it means all the bad parts of Javascript are still present.

Con

No support for dead code elimination

Typescript compiler does not remove dead code from generated file(s), you have to use external tools to remove unused code after compilation. This is harder to achieve, because Typescript compiler eliminated all type information.

Con

Type checking not enforced by default

You have to use compiler flags to make sure it catches flaws like usage of implicit any, etc.

Con

Type inference coverage is incomplete

The default type when declaring and using a variable is any. For example, the following should break but does not:

Con

Small community

Con

No Windows version

Alternative Products

Each month, over 2.8 million people use Slant to find the best products and share their knowledge. Pick the tags you’re passionate about to get a personalized feed and begin contributing your knowledge.