3 ms·
I much prefer explicit over implicit so I'm not a big fan of RAII. I find it hides things that are happening in the code which makes it hard to find performance
by doublec 11y ago
I much prefer explicit over implicit so I'm not a big fan of RAII. I find it hides things that are happening in the code which makes it hard to find performance and other problems from inspection. ATS has tail call optimisation and destructors would make it hard to tell when TCO can't be done due to the hidden destructor calls.
Another nice thing ATS has is the ability to specify the API for a C function to a level of detail that enables removing a whole class of erroneous usage of the C API. I have an example of this where I start with a basic API definition and tighten it up by adding type definitions:
http://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-memory-in-ats.html http://bluishcoder.co.nz/2012/08/30/safer-handling-of-c-memo...