News for hackers. Stuff that matters.
Re:C99/C11 dynamic array that mimics C++'s std::vector by blub on Saturday January 07, 2017 @10:05AM (#13344428)
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.

Re:C99/C11 dynamic array that mimics C++'s std::vector by semi-extrinsic on Saturday January 07, 2017 @10:49AM (#13344666)
> 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.

"""

Re:C99/C11 dynamic array that mimics C++'s std::vector by JoeAltmaier on Saturday January 07, 2017 @06:04PM (#13347206)
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.

Re:C99/C11 dynamic array that mimics C++'s std::vector by st3fan on Saturday January 07, 2017 @07:14PM (#13347460)
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.
Re:C99/C11 dynamic array that mimics C++'s std::vector by inDigiNeous on Saturday January 07, 2017 @05:52PM (#13347156)
Well, Linus is a great C -programmer, so that's something he knows well and likes to protect and embrace.
Re:C99/C11 dynamic array that mimics C++'s std::vector by pjmlp on Saturday January 07, 2017 @05:01PM (#13346891)
Yet he had to move to Qt for Substrate due to issues with Gtk.