Hacker News new | ask | show | jobs
by gizi 4093 days ago
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++. We needed a way to further simplify C.

3 comments

What's a left-right rule? Arrow binds tighter than deref, just like multiply binds tighter than plus. That's * (x->a->c)=5, just like how a * b * c + d * e * f works. C and C++ have some confusing precedence (famously, bitwise), but this is not one of them.
>We needed a way to further simplify C.

Lua is the answer. :P

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.