This is the mail archive of the
mailing list for the GCC project.
Re: A FrontEnd in C++?
On Thu, Aug 22, 2002 at 06:48:10AM +1200, Ross Smith wrote:
> On Thursday, 22 August 2002 05:40, Zack Weinberg wrote:
> > 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
Sure. This is why I'm not a priori opposed to rewriting the entire
compiler in a more powerful language. C++ seems a logical choice; it
has fewer compatibility issues with C than other languages, and would
definitely provide benefits. Simply being able to use STL for basic
data structures might be worth the change.
We would have to be prepared to require a relatively modern C++
compiler to bootstrap with, and given that we still require K+R
compatibility I don't see that happening anytime soon.
I *am* opposed to rewriting anything *less* than the entire compiler
in C++ or any other language, for previously stated reasons.
> > You have to have a functional compiler and runtime library for
> > each source language, for starters.
> We already do. g++ and libstdc++ are perfectly good.
Not starting from scratch you don't have g++ and libstdc++. Think
> 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.
I do not agree with this assertion. I believe that the Ada front
end's problems are largely due to being written in not-C, and the
fact that not-C happens to be Ada is irrelevant.