[openbeos] Re: Kernel status (POSIX)

>> Like doing things with the kernel, where you can't use C++. :-)
>
>Just out of curiousity, why can't you=3F I was under the impression that 
>although you can't use exceptions, everything else works fine.

Truth is, you probably can, at least in some limited way. 
Personally, I think that it would be more pain than it is worth.
Every time you play with the stack, you have to be more careful.
Plus, the compilers for C++ do things that are not as easily understood,
from my POV, so it is more difficult to know if you are accidentally breaking a 
rule.
Finally, as has been my experience outside of OBOS, C++ makes it very easy
to invoke a lot of code with only a little bit of code. That is part of its 
power.
I had an issue at work where x[i]=""; was invoking a couple hundred lines of 
code.
It was used in a loop as an initializer for every data item read from a flat 
file.
It took me a day or so with the code profiler to figure out what was going on 
and
to replace that with x[i].clear(); which had a different, much faster 
implementation.
That is the sort of thing that you want to avoid in kernels. 


Other related posts: