On Thu, 2007-05-24 at 19:41 +0000, Ted MacNEIL wrote:
> Now, C++ is a different matter.
> When I took a C++ course, the instructor said we should NEVER code
> (sub-)systems with it.
How about a quote from a fella who's had some experience in kernel code
in another universe:
"Finally, while Linus maintains the development kernel, he is the one
who makes the final call. In case there are any doubts on what his
opinion is, here is what he said in 2004:
In fact, in Linux we did try C++ once already, back in 1992.
It sucks. Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.
The fact is, C++ compilers are not trustworthy. They were even worse in
1992, but some fundamental facts haven't changed:
* the whole C++ exception handling thing is fundamentally broken.
It's _especially_ broken for kernels.
* any compiler or language that likes to hide things like memory
allocations behind your back just isn't a good choice for a
kernel.
* you can write object-oriented code (useful for filesystems etc)
in C, _without_ the crap that is C++.
In general, I'd say that anybody who designs his kernel modules for C++
is either
* (a) looking for problems
* (b) a C++ bigot that can't see what he is writing is really just
C anyway
* (c) was given an assignment in CS class to do so.
Feel free to make up (d)."
No-one ever said the lad wasn't forth-right.
Shane ...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html