C++ In The Linux kernel
An anonymous reader submits "A researcher at Reykjavik University Network Laboratory (netlab.ru.is) has just released a Linux patch allowing for complete kernel-level run-time support for C++ in the Linux kernel, including exceptions, dynamic type checking and global objects (with constructors and destructors) The implementation is based on the C++ ABI in GNU g++, but contains various kernel level optimizations, that reduces the cost of throwing exceptions by an order of magnitude, thus making C++ exceptions viable in several scenarios. Furthermore, the Linux module loader is extended to handle weak symbols in C++, so that dynamic type checking is reduced to a pointer comparison, in contrast to string comparison."
hahaha.
You _don't_ use C++ that much, evidently.
And, you OBVIOUSLY havn't read Linux kernel code.
Obfuscation and opacity are its hallmarks.
I'll read a LISP kernel before I read a C kernel, given the choice.
/b
|f(x)dx = F(b) - F(a)
Both your C and your C++ code absolutely suck. It's scary to think they let you anywhere near avionics of any type.
> Yeah, who wants a common driver API for video, network, or sound cards...
I don't understand why a common driver API is not possible to do in C... Would you care explaining?
> Not to mention that drivers are all about abstracting the hardware and interface implementation from the OS itself anyway...
Does that mean we should give up on transparency?
> You can do some pretty neat things in C++ if you know what you are doing. If you don't know what you are doing, you can do some pretty crappy things.
This (again) begs the question: what can you do in C++ that you can not do in C? Is it just because classes, objects, constructors, destructors, inheritance, and all that crappy OOP stuff is specificly declared that C++ is that superior? You can do pretty well the same in C! There is absolutely no consistent technical reason supporting the use of C++ in the Linux kernel!
Quoting the FAQ that you should indeed read since there are some Linus quotes there:
"C++ is meant to take C and throw it in an OOP direction."
Wrong. It was designed to support a variety of programming paradigms. OOP only being one of them.
"It's stupid comments like yours that really drive down the merits of actual computer science. Since you don't understand the issue you take up an irrational and off-base point of view."
Nice screed. It'd be better if it wasn't based on incorrect information and shallow analysis.
"The problem is that the world is full of lazy stupid people just like you."
And pompous people who think they know something but clearly don't. And by clearly I mean that anyone who wants to can go get a copy of the D&E and see why you're wrong.
Maybe you and the other poster (who is probably you anyway) should go get a clue in the real world of programming and start thinking for yourself instead of spouting childish antagonistic questions based on what you learnt on Programming 101.