comp.lang.ada
 help / color / mirror / Atom feed
From: slinky.cs.nyu.edu!slinky.cs.nyu.edu!nobody@nyu.edu  (Robert Dewar)
Subject: Re: Language runtime requirements (was Re: DoD asks Microsoft ...)
Date: 12 Aug 93 11:53:26 GMT	[thread overview]
Message-ID: <24davm$5i0@schonberg.cs.nyu.edu> (raw)

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).

                 reply	other threads:[~1993-08-12 11:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox