From: Yonik Christopher Seeley (yseeley@leland.Stanford.EDU)
Date: 07/06/93


From: yseeley@leland.Stanford.EDU (Yonik Christopher Seeley)
Subject: Re: ALPHA-pl11 available on nic: C++ support
Date: Wed, 7 Jul 1993 00:33:06 GMT

In article <1993Jul6.225821.4791@unlv.edu> ftlofaro@unlv.edu (Frank Lofaro) writes:
> Please do not force developers to either know C++ to
>understand the kernel, or to modify/write drivers for it. Those of us
>that do not know C++, and only know C (and do not have the time,
>energy, or desire to learn C++) would be left out in the cold. I want
>to be able to contribute to Linux in the future. Thanks.
>

Well writen ANSI C code will normally require little or no changes
to compile with a C++ compiler. You will have to understand very
little about C++ to understand the kernel as it stands now.

Here is probably all you have to understand:
- Prototypes are required
- C++ is a strongly typed language, explicit typecasts may be necessary
- Overloading : foo(int, char) is a different function from foo(float)

I don't see any good reasons not to make the kernel C++ compilable,
for one can use as little or as much C++ code as desired. Using
simple C++ features such as overloading can increase readability
and come at no extra expense. In addition, C or C++ style linkage
can be specified down to the level of single symbols.

I think that the move to C++ as a positive one, and hopefully more
C++ code can be incorporated into the kernel as time goes on. If you
do it right, there need not be any performance loss, and you can
gain greater modularity + readability + (other ads of C++).

As for your desire to learn C++, it is being used more all the time
in industry. It would be good for you to learn more about it ;-)

- Yonik Seeley
yseeley@cs.stanford.edu