At kernel level nothing will stop me to halt() the cpu, if I realy want
to. It is important to understand that tools (and all compilers are
just tools) will not enable me to write correct code.
>
> I can say a lot of good and bad things about C++, but at least it lets you do
> this kind of thing with type safety and without ugly macros.
>
Yes. That's absolutely true for C++. But the kernel is implemented
in C and C is "only" kind of a high-level-assembler language. It is
ment to be open - on purpose. There exist other languages that
have these kinds of concepts you bring in (I would not use C++ as
the best example - take OBERON/MODULA or EIFFEL). But these
languages are not made to implement an operating system
(remember the reason K&R have specified and implemented C?).
What I realy dislike is the approach to bring in any OO concepts
into the C language the linux kernel bases on. Keep the code as
simple and homogenous as possible (or try to rewrite it in OO).
The way I see this discussion is: Every software problem has it's
proper language to be solved in. And for this, Linus decided it to be
C.
Regards,
Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/