Introduction to Programming in ATS: | ||
---|---|---|
<<< Previous | Next >>> |
I have given a presentation of the core of ATS in this part of book. While this core is largely similar to the core of the functional language ML (and various other call-by-value functional languages), there are also crucial differences. I list some of these differences as follows:
ATS shares the same native data representation with the C programming language. This differs profoundly from ML and most other functional languages, which all rely on some forms of boxed data representation. In ATS, there are native/flat/unboxed tuples and records as well as boxed ones.
ATS supports both envless functions and closure functions while ML and most other functional languages only support the latter. In ATS, envless functions and closure functions can be differentiated at the level of types.
In ATS, there are both function templates and polymorphic functions. The need for the former primarily stems from the need for handling native data representation directly.
ATS provides explicit support for mutually recursive tail-call optimization.
<<< Previous | Home | Next >>> |
Example: Mergesort on Lists | Up | Support for Practical Programming |