Not everything is a nail...
Posted Jan 13, 2011 13:50 UTC (Thu) by
khim (subscriber, #9252)
In reply to:
Sobotka: Why GIMP is inadequate by romanfi
Parent article:
Sobotka: Why GIMP is inadequate
The kernel is full of object oriented designs like inheritance, virtual functios, namespaces, inline functions, member functions, member access, etc., why not using a hammer?
Because not everything is a nail? Seriously: take a look on how kernel does thing and you'll see that C++ design will be more complex and much less flexible. C++ is great hammer but it's still a hammer. If you use C++ then you tend to think that every problem is a nail and this leads to truly ugly code.
Today's C++ (especially C++ 200x in GCC 4.5+) includes more then hammer, but it's still quite hard to use right (and the code produced in C++ is usually significantly more resource-hungry and slower then code written in C), but 10 years ago it was a joke.
I think it's good idea to use C++ for things where there are not enough developers ("bloated and slow, yet working program" is still better then lead and mean program which "will be delivered RSN for the last 10 years"), but for kernel C++ is bad choice.
(
Log in to post comments)