[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory management

Steve Baker wrote:

> > Changing the type of objects at runtime, as in dynamic_cast<> or
> > something else? Arrays of different objects is basic OOP, isn't it?
> Well, arrays of POINTERS to different objects derived from some
> common base class.
> You can't really have arrays of the actual objects because they
> are all different lengths!

Yes, of course I knew that, I just assumed the "*". :-)

>From the C++ FAQ: "Arrays are evil." ;-)

> > When I say C++ is crap, I know what I'm talking about. It can be made to
> > work, but it is creepy at best. Compared with the streamlined elegance
> > of Smalltalk or Objective-C, C++ looks like a clunky elephant.
> Oh - oh....another flame war brewing....I'm biting my tongue and
> typing with one hand.

Oh, not a long flame war... I think C++ is crap, but that doesn't stop
it from being useful crap or fast crap.

C++ is definitely a whole magnitude faster than Objective-C. Heck, a
method call in ObjC needs to rummage thru a HASH TABLE!!! But on todays
computer, I think the difference is marginal and gives more than enough
benefits to compensate (distributed objects in C++ and in ObjC are a
whole different ball game!).

LISP is often considered as one of the best languages ever, but you
don't see a LOT of code done in LISP (there's a sizable amount, but
nothing major like C). Smalltalk or Eiffel (don't remember) has been
declared the best OO language ever by the High Wizards, but that doesn't
make them popular or make C++ any less useful.

I do find closures, delegates, anonymous code/data and other such
niceties as very cool and nifty. :-)

Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi