comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com
Subject: Re: Adding Things to Package System
Date: 1999/02/21
Date: 1999-02-21T00:00:00+00:00	[thread overview]
Message-ID: <7anj1r$mqp$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 1999Feb20.003952.9906@nosc.mil

In article <1999Feb20.003952.9906@nosc.mil>,
  claveman@cod.nosc.mil (Charles H. Sampson) wrote:

<<description of GNAT pragma Extend_System snipped>>

> What a nice implementation!  Simple and clean.  But
> why did you do  it this way rather than following the
> advice (contained within the implementation permission
> section of 13.7) of a child package?  Are you actually
> trying to capture Dec Ada code?

But our implementation *is* a child package, and of course
it is much better to do

   with System.Aux_DEC;

and in this case you do not need to use the Extend_System
pragma. But, as you hint in your last sentence, that does
not provide 100% compatibility with DEC Ada code, and,
especially on DEC Alpha VMS, GNAT aims at a VERY close
level of compatibility (for example, we expect to be able
to execute almost all of the tests in the GNAT test suite
unchanged, and similarly, to execute customer's code with
no changes).

This requires a much deeper level of integration, the extra
declarations must be an integral part of standard, and that
is what is achieved by the Extend_System pragma.

This way, you have the best of both worlds, you can use
either the RM advised (and obviously preferable) approach
of a child package if you are writing new code, or if you
are willing to do surgery to your code, and use the
Extend_System pragma if you want absolute compatibility.

Note that we only provide Aux_DEC at the moment as part of
the actual GNAT distribution, but a user can provide any
set of auxiliary declarations. So if you have code from one
of these other Ada 95 compilers which (unwisely in both my
view, and as Charles points out, the RM's point of view),
adds junk to System, you can provide an exactly compatible
GNAT environment by adding the same junk to System using
the Extend_System pragma :-)

Robert Dewar
Ada Core Technologies


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1999-02-21  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-18  0:00 Adding Things to Package System Charles H. Sampson
1999-02-18  0:00 ` dewar
1999-02-20  0:00   ` Charles H. Sampson
1999-02-20  0:00     ` Matthew Heaney
1999-02-21  0:00     ` dewar [this message]
1999-02-23  0:00 ` Tucker Taft
1999-02-26  0:00   ` Charles H. Sampson
1999-02-27  0:00     ` Tucker Taft
1999-02-28  0:00       ` dewar
1999-02-28  0:00     ` robert_dewar
replies disabled

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