This is the mail archive of the
mailing list for the GCC project.
Re: A FrontEnd in C++?
On Thursday, 22 August 2002 05:40, Zack Weinberg wrote:
> It seems that many people are more sanguine about allowing front ends
> to be written in their own languages than I am. I didn't properly
> explain why I don't like the idea; let me try again.
> There is an intrinsic complexity burden to maintaining a program with
> components written in multiple languages.
But there is also an intrinsic complexity burden in trying to write very
advanced software in a language as primitive and clunky as C. It's not
at all clear to me that the added complexity caused by mixing source
languages would outweigh the reduced complexity caused by using a more
powerful language such as C++; in fact the reverse seems much more
> You have to have a
> functional compiler and runtime library for each source language, for
We already do. g++ and libstdc++ are perfectly good.
> On top of that, all the languages have to be ABI
Since the C++ language includes a standard construct (extern "C")
specifically for this purpose, I don't see this as an issue.
> I raised the Ada front end as an example, since it is the only front
> end written in its own language currently present in the official GCC
> tree. I am certain that (for instance) a C++ front end written in
> C++ would have the same sorts of problems.
But nobody is talking about writing a C++ front end in C++, or for that
matter about writing a Language X front end in Language X. This whole
"bootstrap a front end in its own language" issue is a straw man you've
introduced. The suggestion being discussed is writing a Language X (for
X!=C && X!=C++) front end in C++ -- _specifically_ C++, not just any
Any objections based on analogies to Ada are irrelevant, because (it
seems from what those in the know have been saying here) most of the
Ada front end's problems are consequences of bootstrapping in the same
language, which isn't under consideration here.
Ross Smith ..................................... Auckland, New Zealand
"A specter is haunting Wall Street; it is the specter
of honest accounting." -- Arthur D. Hlavaty