|
|
Nicolas Alvarez wrote:
> Darren New wrote:
>> Warp wrote:
>>> Exactly which part of C is simpler for newbies than C++?
>> You don't have to deal with constructors, destructors, exceptions, the
>> difference between casing classes and casting pointers to classes, etc.
>
> Right; instead, you have to deal with a dozen different library
> implementations of object construction, destruction and error handling;
Actually, I don't. Note the term "newbies". :-)
I honestly wouldn't teach either one as a first language. Even Pascal is
pushing it, IME.
> Another example: POV-Ray 3.6 has virtual functions reinvented in C (to call
> "intersect with ray" on any Object* without knowing if it's a Sphere or an
> Isosurface). It's harder to figure out what's going on than if you just had
> a C++ class with virtual methods, because no other C program does it
> **exactly** the same way as POV 3.6.
Yep. And the problem is that no C program can possibly do it the same way as
C++ in any sort of portable way. So every C++ library that uses any of this
sort of feature is incompatible with being called by any sort of C program.
Hence, the proliferation of such faux-OO libraries.
--
Darren New, San Diego CA, USA (PST)
The question in today's corporate environment is not
so much "what color is your parachute?" as it is
"what color is your nose?"
Post a reply to this message
|
|