Hacker News new | ask | show | jobs
by nithinm 3298 days ago
why the c++ hate in comments? because of the memory leaks?
1 comments

because of the hidden magic. Linus has a great message on a mailing list somewhere on this. Basically it boils down to: don't have hidden magic in important OS parts, it's bad and helps nobody except for people that explicitly want to use c++.
The crux of the issue I believe is C++ can lead a bewildering mess of coding styles and abstractions, making it difficult for the thousands of people working on the kernel to grasp each other's code. This would be mitigated to a large extent by using the simpler C, hence the rule.

C++ needs a lot more discipline and thought if you don't want unmaintainable code years down the line. Ironic given that abstractions introduced by C++ are partly to make code more efficient to write, extend and maintain.

What "hidden magic"?
A C++ line does way more things than a similar looking C line. The developer may not be aware of all those extra things.