Hacker News new | past | comments | ask | show | jobs | submit login

There are perfectly legitimate use-cases for such a "C+" style. The disadvantage is that it won't be considered "good C++ style" and would limit the attractiveness of the project to C++ programmers that enjoy modern C++.

If one would include vector, string, array, smart pointers and maybe simple template code in C+ it would already have a big safety advantage over plain C.




> would limit the attractiveness of the project to C++ programmers that enjoy modern C++

As Linus wrote when someone told him on the mailing lists that Git should've be done in C++

"""

Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.

"""


Sounds like a bitter old fossil. My first look at Linux, there were 200 sound-card drivers in the source base. Mostly identical except for the layout of bits in the control register. Any change to the api or conventions, 200 files had to be edited. An ideal place to refactor as a 'sound card' base class and derive classes to handle the (miniscule) differences.

"Keeping new ideas away" is a good working definition of an old coot.


You don't necessarily need C++ to implement a good driver design with base classes and minimal code duplication. It is perfectly possible in C.


Well, Linus is a great C -programmer, so that's something he knows well and likes to protect and embrace.


Yet he had to move to Qt for Substrate due to issues with Gtk.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: