On Mon, 24 Apr 2006, J.A. Magallon wrote:
On Mon, 24 Apr 2006 22:52:12 +0100, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
On Llu, 2006-04-24 at 15:36 -0600, Jeff V. Merkey wrote:Tell me what is the difference between:C++ in the kernel is a BAD IDEA. C++ code can be written in such aSo can C.
convoluted manner as to be unmaintainable and unreadable.
All of the hidden memory allocations from constructor/destructorThis is one area of concern. Just as big a problem for the OS case is
operatings can and do KILL OS PERFORMANCE.
that the hidden constructors/destructors may fail.
SuperBlock() : s_mount_opt(0), s_resuid(EXT3_DEF_RESUID), s_resgid(EXT3_DEF_RESGID)
I'd like to write modules in FORTRAN, myself. Unless you have been
writing software since computers were programmed with diode-pins, one
tends to think that the first programming language learned is the
best. It's generally because they are all bad, and once you learn how
to make the defective language do what you want, you tend to identify
with it. Identifying with one's captors, the Stockholm syndrome,
that's what these languages cause.
But, a master carpenter has many tools. He chooses the best for each
task. When you need to make computer hardware do what you want, in
a defined manner, in the particular order in which you require,
you use assembly language to generate the exact machine-code required.
It is possible to compromise a bit and use a slightly higher-level
procedural language called C. One loses control of everything with
any other language. Note that before C was invented, all operating
system code was written in assembly.
C++ wasn't written for this kind of work. It was written so that a
programmer didn't have to care how something was done only that somehow
it would get done. Also, as you peel away the onion skins from many
C++ graphics libraries, you find inside the core that does the work.
It's usually written in C.