Re: C++ & gnome (was: Re: opening Gnome to multiple (windowing) systems)




> I understand the need to avoid C++ (name mangling, longer compile
> times, shifting language specification et) for widget set
> implementation but to call C++ "arcane" is just bizarre.

Well, strings are still implemented as chars.  You still do have
buffer overflows, C++ is basically: C + objects + every single
feature they could come up with.

So, the language, unfortunatelly is still too close to the machine.
If you wanted all of those wizbang features, why not start by using a
language that designed things correctly (as the TOM, and Java people
did). 

Now, lets see the rundown of features of C++:

> C++ has nothing that SmallTalk, Simula and other languages have.

It has complex rules.  It does too many implicit things all by
itself. 

> In addition C++ has some real neat stuff (that *CAN'T* be
> done in  C like templates).

Yeah, I have noticed templates.  To compile some Mico source files
(which makes use of templates to some extent) you need 48 megs of ram.
I wonder what will happen in a couple of years when people abuse
templates.

Now, instead of having libraries of precompiled components, with
templates we get the chance to recompile the same code over and over!
Wonder why I had not thought about this before!  It must be useful for
some kind of regression test or something at least. 

Wonder how an X11 compile would be if templates had been available at
the time. 

> Polymorphism allows programmers to avoid the C monster switch
> statements.

False.  You can do this just fine in plain C.  Ever wondered how
Microsoft's COM works?

> Exceptions and RTTI are also invaluable tools.

Those were not around when I learned C++.  I see they have been busy
adding even more features to an already bloated language.  No wonder
the Netscape people avoid so many C++ features to get portable code.

> Things like the Std C++ library are great - the STL is fantastic - C
> just has nothing to answer with.  Another great thing about C++ is
> encapsulation which avoids passing critical data pointers as
> arguments to functions.

I still think that raising the programming level is the right approach
in this context.  

> Delphi is a fine product and deserves more attention than it gets.
> Although I don't really fancy pascal - those 'begin's and 'end's
> drive me batty.

Java is basically ObjectPascal with C syntax.  

Miguel.



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