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

Re: memory management

>Changing the type of objects at runtime, as in dynamic_cast<> or
>something else? Arrays of different objects is basic OOP, isn't it?

Not in C++ - without some tomfoolery foo[2] can't be a different type from
foo[3] if they're both objects - it's easy if they're pointers to objects.

> Basically, it's all about using counting references, and making "new"
> innaccessible.

>Does he talk about soft vs hard references and circular references? Does
>the book talk about creation patterns, like pluggable factories and
>metaclasses objects?


>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.

Yes, but it's hard enough to get people to use ANYTHING decent. At least they're
already using C++. Walk into anywhere real which has a 100 people doing C++ and
say "actually you need to switch to SmallTalk" - you're still going to be
hearing the laughter a month later. "If you work like this, your C++ programs
might be a bit more stable" is a bit less of a cliff.

I'd learn smalltalk if I thought it would be remotely useful, but I keep on
getting C++ work, and it's not even stretching the C++ envelope - it's
practically C-with-classes coding. 10 years, and the industry in general might
be able to handle smalltalk.

{ Hell, never mind exceptions; most places are still returning integer success
codes, because boolean types aren't handled by the compiler or the management or
both. }