C++

Miscellaneous Forums/General Discussion/C++

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Oh, Lisp also features garbage collection, closures, bignums (integers that have no limit on their size...i.e. 125036969692692962962369 is stored correctly), native support for fractions and complex numbers, vectors, hash tables, strings, lists, associative arrays, and resizable arrays as native types along with

*interactive compilation - compile a function at a time, no need to compile a whole file. Compile just a function (or statement) and test it immediately.

*built in profiling

*the ability for a running program to compile code and integrate it into the program

*the ability to debug a running program without interrupting it

*an error handling system that far exceeds standard exception handling. You can signal a 'condition' (similar to an exception) and this will then return up the stack and search for a handler. However, this doesn't unwind the stack. You can also define restart cases, and these restart cases can be called from a condition handler. So, for example, if you are parsing a log file and it's got some kind of problem you can signal a condition, and the code higher on the call stack can choose how to handle it. Data can also be passed back and forth between a condition and it's handler - so in this example the handler might ask the user to fix the offending log entry and then pass that back to a restart case to get parsed, and then things would resume where they were. Of course, unwinding the stack is possible - it's just not mandatory.

And last, modern Lisp implementations can churn out code that's as fast or faster than C/C++. Not always, mind you - and Lisp does usually take up a bit more memory (it does have garbage collection and dynamic typing, after-all). However, that's a small price to pay for such a powerful and expressive language. The only other drawback is that it's not all that popular and so there aren't many pure Lisp based libraries for things like games. You'd have to write the wrappers for C based code yourself.