3 ms·
"Up until now, everything that I'd seen done in Lisp could easily be done in C++ too. The only real difference was a little more verbosity. But the unit-testing
by palish 19y ago
"Up until now, everything that I'd seen done in Lisp could easily be done in C++ too. The only real difference was a little more verbosity. But the unit-testing framework that was developed in that chapter..."
Interesting that a unit testing framework was the final straw. It's horrible not being able to use closures.
- dfranke 19y agoIt's usually lack of garbage collection that gets to me the fastest. Closures are a close second, but those you can easily fake in nearly any language. In Java, anonymous classes usually do the job. In C with GNU extensions, you can use nested functions as callbacks, with the caveat that they'll only be available within the dynamic scope of the caller.
- jey 19y agohttp://www.boost.org/libs/smart_ptr/shared_ptr.htm http://www.boost.org/libs/smart_ptr/shared_ptr.htm Granted, it's not garbage collection, but sometimes you have to write C++ and boost makes that manageable. boost::shared_ptr is based on refcounts, so you need to be aware of cycles and use boost::weak_ptr accordingly.
- damien 19y agoLack of garbage collection built into the language, you mean? I'm not disagreeing with you, just clarifying.
- dfranke 19y agoYes.