Re: linux headers and C++

Albert D. Cahalan (acahalan@cs.uml.edu)
Wed, 7 Jul 1999 00:28:23 -0400 (EDT)


Khimenko Victor writes:
> In <006301bec7d0$1d095b30$390101c0@d1> Marco Ermini (mail@markoer.org) wrote:
>> From: Alan Cox <alan@lxorguk.ukuu.org.uk>

>>> C++ is a preprocessor, nothing more. Check how the original C++
>>> compiler was implemented.

If you consider a C++ compiler to be just a preprocessor, then every
other compiler is too. The only thing _not_ a preprocessor is a CPU.

>> Of course, in the early days C++ was just
>> a preprocessor, but I don't think a
>> preprocessor could alone implement
>> dynamic thunking, or dynamic template
>> generation, or dynamic binding of the class
>> methods invoked by derivated functions.
>
> I not think. I know :-) Latest versions of cfront had (has? is cfront
> still alive?) had all such bells and whistles acting as preprocessor...

C++ template stuff is Turing machine equivalent. I've seen code that,
when compiled, causes the C++ compiler to compute prime numbers.
It was a giant hack, complete with all the normal Turing machine
tape head insanity. You throw away the compiler output.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/