[plug] xargs, "Argument list too long"

Cameron Patrick cameron at patrick.wattle.id.au
Thu Jan 30 13:39:51 WST 2003


On Thu, Jan 30, 2003 at 12:47:19PM +0800, Mike Holland wrote:

| Dont lump C++ with C. The C++ String class fixes that.
|    And if you keep all heap pointers in classes, with free() in 
| destructors, you help avoid the nightmare of C dynamic memory management.
| You can even have garbage collection.

Okay, so C++ is a little better than C in this regard.  It is still nowhere near
as good as the likes of Python, Perl or other high-level languages[1] in terms
of safety and amount of waffley low-level stuff (e.g. type declarations, having to
repeat definitions in source files and header files) that you shouldn't have to worry
about.  Nothing in C++ will stop you overwriting the bounds of an array, for
instance - even Pascal got that right - and pointers are still incredibly easy to
abuse in strange ways.

Keeping memory allocation in classes and destructors and such doesn't
always help, as in many cases you still have to either implement your
own reference counting or use some kind of garbage collection library
which seem a bit kludgey on top of a language like C(++).

CP.

[1] Specifically excluding Java and C# which seem to combine the
disadvantages of Python (ie efficiency and ease of talking to raw
hardware or lack thereof) with the disadvantages or C(++).



More information about the plug mailing list