Linus says C++ is a horrible language

Ingo Oeser ioe-news at rameria.de
Sun Sep 9 18:04:55 PDT 2007


renoX wrote:

> John Demme a écrit :
>> Walter Bright wrote:
>>> Bring on the flame war!
> 
> Well he's right about the main point: memory and CPU consumption are
> 'global variable' that cannot be hidden inside libraries/class:

Yes, that is the main objective about C++ there.

> many 
> times the developer use the library not as expected and the performance
> suck, it's not truly a problem of C++ more of modular development.
> 
> The only way I'd see to fix this is to be able to annotate or deduce a
> complexity formula for a function and combine those formula to have an
> idea so that the developer may have an idea of the expected performance,
> not easy to do automatically and quite time consuming if done by hand :-(

You can do that quite simply by separating function and vectorisation.
Also helpful is the separation of linear and decision making code.
These idiom are actually quite common in the Linux Kernel. 

To make the rest of them use that idiom, one would need nested functions
and sometimes lambda expressions.


> I doubt that he would like D too: first he (and the other Linux kernel
> developers) is truly a C expert so it'd take a lot to move him from C.

I doubt that. He is actually quite open to radical changes, if one can roll 
them out in small steps :-)
 
> That'd said, he's not 100% satisfied of C either as he invented a tool
> sparse to add additional checks, so you could say that Linux kernel is
> developed in a C-variant not truly in C.

Yes, that is true. Efficiency in review, getting things coded and catching 
errors as early and as significant as possible is crucial for Linus.

The closed source guys in this groups might not realise, that every line 
of Linux code is actually reviewed by at least hundreds of people, even
if most of them don't bother to comment it.

One comment I would be quite sure of: D is quite x86 (types and behaviour) 
and Windows centric (libraries) at the moment. But I'm happy, 
that good people work on these issues at this very moment.


Best Regards

Ingo Oeser



More information about the Digitalmars-d mailing list