From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b084786fb95b5938 X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Adding Things to Package System Date: 1999/02/21 Message-ID: <7anj1r$mqp$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 446539751 References: <1999Feb18.192159.18832@nosc.mil> <7ai6f5$7hk$1@nnrp1.dejanews.com> <1999Feb20.003952.9906@nosc.mil> X-Http-Proxy: 1.0 x9.dejanews.com:80 (Squid/1.1.22) for client 129.37.79.86 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Feb 21 00:12:49 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-02-21T00:00:00+00:00 List-Id: In article <1999Feb20.003952.9906@nosc.mil>, claveman@cod.nosc.mil (Charles H. Sampson) wrote: <> > 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