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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 12 Aug 93 11:53:26 GMT From: slinky.cs.nyu.edu!slinky.cs.nyu.edu!nobody@nyu.edu (Robert Dewar) Subject: Re: Language runtime requirements (was Re: DoD asks Microsoft ...) Message-ID: <24davm$5i0@schonberg.cs.nyu.edu> List-Id: The issue of Ada wanting to be the main program is, I think, basically a matter of implementation, rather than language. The difficulty in getting a multi-language environment to work nicely is that it is hard to do if you do not have control over the full range of implementation of all the languages. After all, even typical C compilers tend to have some notions of initializing their runtimes (malloc etc.) In the context of GCC, where the C, Ada, Fortran, C++, Modula-3 etc compilers are all part of the same implementation environment, the multi-language problems are much easier to address. Even the current embryonic version of GNAT has a C main program (the GCC driver) rather than an Ada main program, and is built from an smoothly bound amalgam of C and Ada (Ada for the GNAT front end, C for the existing GCC backend). Our eventual plans are to have the smooth integration between languages work fine throughout the runtime environment. For example, there will be no problem in a C++ procedure handling an exception raised in Ada, or if Ada sets up an ATC (Asynchronous Transfer of Control), then if the ATC event is triggered, any destructors in active C++ (i.e. g++) procedures will be executed as part of the cleanup actions. Of course such integration is not easy, and in particular, the generalized exception/finalization model is quite ambitious, but we don't see any fundamental problems in achieving full language integration for both the compiler and debugger. Of course this depends on being able to modify the other-language compilers (e.g. for this to work, G++ will have to use the same exception management approach as Ada). If we just had to fit into whatever had already been decided for these languages, as is typically the case for an Ada vendor who must try to interface to existing C and C++ compilers, then it's a much harder problem, and one cannot hope to achieve the same level of integration. For another example of effective inter-language integration, have a look at Dec Ada. Here again, the suite of languages has been designed around a common environment (e.g. the VMS system exception manager).