This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A FrontEnd in C++?

What zw discounts in his argument is the huge gain in writing a compiler in
a high level language with good abstraction facilities. There are also
other huge advantages of writing a compiler in its own language:

Avoiding a culture clash. For example, COBOL compilers should be written by
people who really know COBOL well. Such people are not likely to be happy
writing in C. I know of more than one COBOL compiler written in C by
C programmers who really disliked COBOL, and it shows!

Having one really complex test program that must function really well before
you can even get out of the starting gate is a real advantage.

You have more incentive to improve the compiler, since improvements help compile
speed as well as generally assisting users.

A compiler is one component in development systems now, and the quality of
integrated tool sets is critical. If you write a compiler in its own language
then your development team uses the tools that surround the compiler that support
this language, and they have an incentive to develop and improve these tools.

If you run into troubles with the compiler compiling your compiler, you do not
have to rely on external support to solve them. You are the maintainer from whom
you need your own help. Since you know the urgency of your own needs, you will
get excellent support.

As for problems with mixed languages, we have found that to be very little
trouble in practice on a wide range of machines, and many people have succeeded
in building modified compilers (it is in fact an assignment I have given to
many students: "make some interesting modification to GNAT" :-)

A lot of the growing pains in integrating Ada into the FSF structure come from
the fact that this is the first time it is done, so we have had to learn how
it should be done, and from people having the unrealistic expectation that 
you should be able to build from any old ancient version of GNAT used together
with some unrelated version of C.

I think once we have gone through a couple of release cycles with GNAT there,
the problems will mostly take care of themselves.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]