Re: C++ improvements: core and user properties, default compiler
Micah Cowan wrote:
I'm sorry, but I don't understand the point of this question. No
matter the language of the compiler, the compiler is compiled too,
and runs in machine language.
And I think that it is well established that any task that can be
performed by a particular Turing complete language can be
performed by any Turing complete language.
Am I mistaken?
This doesn't take anything away from the point you're making, but it
seemed worth pointing out that this is only true in the context of
Turing machines. C and sed are both Turing-complete; but you can't
open a network socket in sed*. :)
*Ignoring silly things like using the "r" command to open a device
file that opens a network connection, or using sed to drive a
program through a pipe to do so.
Of course, only someone who has neither written nor studied any
sort of compilers could believe that a language such as C would not
be capable of handling a compiler for the complete C++ language.
Grizlyk's arguments would make _somewhat_ more sense if the argument
were whether you could write a program to translate C++ into C
programs with identical functionality, though even there phe'd be
wrong. In fact, I believe Comeau Computing has just such a beast
(and, of course, C++ was originally implemented via a
Which was, of course, written in C++.
though the language back then was not nearly as
If I were planning to write a C++ implementation, writing it in C
would be something I'd strongly consider, in no small part because
(old) standards-conformant C implementations still appear to be
more plentiful than C++ implementations, and because even if I
chose to write it in C++, I might choose to avoid many of the most
advantageous pieces of the C++ Standard Library, as I might not be
able to depend on their having been implemented as optimally as I
Hey, if you write your own C++ compiler, you will of course have the
best Standard Library implementation as well. Just write that one
Of course, writing in C++ would have the advantage that I could then
bootstrap my implementation, which is a terrific, "eating your own
dogfood" way to test it. :)