What, again?
Posted May 2, 2007 3:42 UTC (Wed) by
ncm (subscriber, #165)
In reply to:
What, again? by peterh
Parent article:
The Rise of Functional Languages (Linux Journal)
It has been almost ten years since I coded a "delete" statement in C++. I can't forget to write them because I never needed to write them in the first place. How does memory get freed? Destructors free it. I don't write calls to destructors, because the compiler writes those calls itself.
That's what is meant by "encapsulating resource management in libraries": all the work is coded in the library, and then you just use it. There is no value at all in the language providing "memory-safety" when the language is powerful enough to allow it to be encoded in libraries in exactly the forms needed. A language not powerful enough to encode resource management in a library looks useless to me.
Finalizers are little more than a cruel joke, and do not merit discussion in this context.
(
Log in to post comments)