One thing that sets ATS apart from other programming languages
is the support for gradually transitioning an implementation that depends on
GC into one that does not. This kind of transitioning can be guided by
typechecking.
There are several ways to use higher-order functions in ATS without the
need for GC:
1) Using templates.
2) Using stack-allocated closures.
3) Using linear closures, which are heap-allocated and can be safely freed.
Note that (1) and (2) do not even rely on malloc/free. So in ATS, you can
use higher-order functions in a setting (e.g., embedded programming) where
dynamic memory allocation is not allowed or supported.
On Wednesday, March 5, 2014 1:08:05 AM UTC-5, H Zhang wrote: