Re: is LISP the ultimate prgram language?
Stefan Ram wrote:
?As for myself, it wasn't until I got to play
extensively with Smalltalk, Objective-C, and LISP that
I realized just how badly broken C++ is.?
Smalltalk and LISP maybe, but Objective-C? That's just crazy, IMO.
Objective-C has no RAII, no automatic constructors (in fact, it has no
constructors at all, besides whatever non-enforced coding convention may
be used in the program), you cannot have objects as members (only
*pointers* to objects, which means that the objects are never
instantiated automatically, but you always have to instantiate them
manually in your chosen "constructor" method), you cannot have
types/classes inside classes (which greatly hinders modular design), no
private member functions (AFAIK; you can try to "hide" member functions
by not mentioning them in the header, but AFAIK you cannot stop outside
code from calling those functions), you cannot copy-construct nor assign
objects (at least not using compiler-generated code).
Those are some of the major flaws I have found in Objective-C. Some
less annoying flaws are lack of multiple inheritance (you can argue all
you want against MI, but in some situations it *is* useful), no "pure
virtual" functions (ie. a way to force a derived class to implement one
of the base class functions), and no templates (in some respects the
messaging and introspection mechanisms alleviate the lack of templates
eg. when creating generic containers, but at the cost of decreased
efficiency and increased memory usage).
C++ might be "badly broken", but I prefer it any day before Objective-C.