From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.5 required=3.0 tests=BAYES_05,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 20 May 93 13:44:25 GMT From: netnews!schonberg!dewar@nyu.edu (Robert Dewar) Subject: Re: verdix kisses off Ada Message-ID: List-Id: I am sorry to puncture a "wonderful irony", but GNU Ada is NOT being developed in C or C++. Here is the exact story: GNAT (the official name for GNU/Ada, it stands for GNU NYU Ada Translator) uses the existing GCC backend. That is, for understandable historical reasons written in C, and we are using it pretty much as is, with some minor changes to accomodate Ada (minor here means that the total impact is a small fraction of the original work). We are *not* going to rewrite this in Ada -- there are good technical and non-technical reasons for this decision, and note that even if this were a project covered by the mandate, no one would suggest that it makes sense to rewrite several hundred thousand lines of code in Ada just for the sake of doing so! The front end of GNAT, which is really where the development of the project is, is in Ada. Currently, for obvious bootstrap reasons, it is in Ada 83, but may eventually shift to 9X as we bootstrap (a point we are close to right now). The GNAT front end is currently about 68,000 lines (23,000 if you count semicolons). Finally there is a relatively small interface module, called Gigi (*), that takes the Ada tree and constructs the GCC tree for the backend. This is written in C because it needs to connect intimately to the C structures in the backend. Actually if we were fully bootstrapped, we probably COULD rewrite this in Ada, since GNAT will inter-operate very closely with GNU C, but there was no way to do this early on, and in any case Gigi is only a couple of thousand lines of pretty straightforward C. So, in terms of new code being written, GNAT is over 90% in Ada. The percentage will increase as time goes on, because we have a lot more additions still to go in the front end. Furthermore, the runtime will also be all in Ada, except for the usual tiny operating system interface stuff that is needed at a low level. So, no irony here! Furthermore, I should report that the experience in switching from C to Ada in our Ada group at NYU (the old Ada Ed code was, as I think people are aware, all in C), was quite remarkable. Our C code suffered from all the usual defects that people associate with C (lack of documentation, lack of clear interface design, incompatible coding styles, very variable quality etc.) When we started coding in Ada, our whole approach changed. We started having regular design meetings which focussed on package spec design etc. etc. You all know this story, I don't have to repeat it in detail, but it certainly is interesting to see it happening again in ones own back yard! Robert Dewar (codirector with Ed Schonberg of GNAT project at NYU) (*) For the curious, the etymology of the name Gigi is that this program translates from the GNAT tree to the GCC tree, hence it came to be called G-to-G or G-squared, and thus Gigi became a natural, somewhat more colorful version of the same name.