Live data from Hacker News

Linus Torvalds on C++ (2007)

thread.gmane.org

31–33 of 33 posts

Re: Linus Torvalds on C++ (2007)

#31
post #9

I agree with Linus. C++ is too complex and overengineered, and taking in contributions in it for something like git, is a recipe for disaster. However, C in all its simplicity already has its potential for abuse. Macros can go very bad. Very bad. (Just look at openSSL). It is also not difficult to abuse the left-right rule in pointer arithmetic: *x->a->c=5. It can easily become incomprehensible. We did not need C++.…

Something like MISRA C ?

Re: Linus Torvalds on C++ (2007)

#32
post #31
post #9

I agree with Linus. C++ is too complex and overengineered, and taking in contributions in it for something like git, is a recipe for disaster. However, C in all its simplicity already has its potential for abuse. Macros can go very bad. Very bad. (Just look at openSSL). It is also not difficult to abuse the left-right rule in pointer arithmetic: *x->a->c=5. It can easily become incomprehensible. We did not need C++.…

Something like MISRA C ?

Yeah, it's alway funny to see the reaction of fresh-from-the-mill CS-academics when they have to code in an MISRA regulated project for the first time. Around half of them quits after a month because they are unable to write 100 lines of working code without some babysitter (aka. garbage collector) cleaning up behind them.

C++ started out as a great 'next generation C', but in the last years it became a playfield for CS-academics, just adding one useless esotheric feature after each other.

Re: Linus Torvalds on C++ (2007)

#33
post #6

> inefficient abstracted programming models where two years down the road > you notice that some abstraction wasn't very efficient, but now all > your code depends on all the nice object models around it, and you > cannot fix it without rewriting your app. The opposite can also be said. By re-inventing a simple data structure, you can end up 2 years later in the same position where your structure is inefficient (list…

> While implicit operator overload was probably a C++ mistake are you talking about the implicit conversion operator or operator overloading in C++? For the former, it has been vastly improved in C++11 with the addition of explicit conversion operator. For the later, some very important capabilities of C++ rely on operator overloading namely the assignment operator (copy/move assignment) and the function operator (al…

The main issue I have with them is "brave" libraries developers who think it is a great idea to overload ->, . and delete. This can create issues where the code you read doesn't actually do what it look to do. I know about smart pointers and all, but really, those "features" are misused.
Post reply on HN