C++, the steampunk language
Posted Sep 14, 2009 16:17 UTC (Mon) by
tjc (guest, #137)
In reply to:
C++, the steampunk language by felixfix
Parent article:
Writing kernel modules in Haskell
My experience with C++ is summed up by having replaced the simple malloc/free paradigm with THREE different ways to allocate : new/delete, new[]/delete[], and the original.
Since you bring it up, do you happen to know
why C++ requires a separate form (new[] v. new) for allocating and deallocating arrays?
I'm aware that arrays are converted to pointers in parameter declarations and (most) expressions, but I don't think that's an issue here. There should be enough information in the symbol table to identify an object as an array and [de]allocate memory for it without resorting to a special form.
(
Log in to post comments)