Object Oriented Linux Kernel With C++ Driver Support
An anonymous reader writes: An effort underway called BOSS-MOOL, the Minimalistic Object Oriented Linux, is designing the Linux kernel with OOP and C++ driver support. Linus Torvalds' opinions on C++ have long been known while developers at the DOS Lab IIT Madras and CDAC Chennai feel redesigning the kernel with object oriented abstractions and C++ driver support will increase maintainability while reducing complexity of the kernel. It doesn't appear though the group will try to mainline these changes.
You should not free up resources in a c++ destructor. I guess that is exactly what Linus meant with his quote.
http://c2.com/cgi/wiki?BewareO...
http://www.codingstandard.com/...
C++ destructors can be used to deallocate any memory, or do other stuff that cannot go wrong. But they cannot be used to release any resources, like sockets, streams, files, connections, etc.
http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
I cannot see how introducing something like C++ will improve the situation. Changing the langauge doesn't get rid of evolutionary code, nor does it fix people's thinking. I can't fault the guys who evolved the musb driver into a working piece of code - the crux of the problems originate with the original Mentor documentation: Unavailable, poorly coverage of errata, poor detail on what the hardware block is doing.
What is required for good drivers are:
If hardware vendors wish to compete for embedded linux systems, then they should promote their performance on how well they do on the open test suite with their linux drivers - not just on their arm core's performance.
-bms
Like gcc, oh wait, not that is written in plain and simple c.
You misspelled "was". The compiler was switched over to C++ a few versions ago and they're now using C++ features.
SJW n. One who posts facts.
I recently had to rewrite a modestly sized embedded project from C++ to C because it became clear that I could not afford the space for the mandatory libraries in the binary.
I did so by retaining the organizational concepts imposed by methods but made the implied "this" pointers explicit. I had to reorganize to undo the damage done by losing inheritance, virtual functions, etc. In a way, my biggest loss was losing overloading and templates. Those afforded elegant solutions that C doesn't match.
When I was done my source code actually shrank and my output binary size was cut in half. In no way could anyone argue that the code became less maintainable or less readable. Execution was notably faster and there was none of the god-awful unknown code executing that I had no control of. Exception handling is gone as is RTTI. Good riddance. I love some things in C++ but, on the whole, it is very burdensome.