Re: C++ pushback

From: marty fouts
Date: Mon Apr 24 2006 - 22:59:09 EST


On 4/24/06, linux-os (Dick Johnson) <linux-os@xxxxxxxxxxxx> wrote:

> 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.

Even if by "operating system" you mean kernel, this turns out not to
be true. Operating systems written in other 'moderate-level' languages
such as Fortran predate C. (Once upon a time, a company called Pr1me
had an OS called PrimeOS, written in Fortran.)

My all time favorite OS, RSTS/E, was largely written in a Dec variant
of BASIC, called BASIC-PLUS.

High level languages have been invented just for writing OSes (BLISS)
and OSes have been successfully written in a LISP, PL/1, and even
C++. The last OS I worked on was almost entirely in C++ and worked ok.

What you don't want to do is add a new language to a system that was
largely written in another language. It's tempting to add C++ to a
large C system because C and C++ are similar, but it's almost always a
disaster, because you organize large systems much differently if you
design them for C++.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/