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,2907a68906511623,start X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Idea for Ada 200x: Arguments that are procedures Date: 1998/07/02 Message-ID: #1/1 X-Deja-AN: 368270562 References: <6nh9f0$66i@netline.jpl.nasa.gov> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 899429018 8631 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-07-02T00:00:00+00:00 List-Id: Van Snyder says <> You are assuming that the restrictions in Ada 95 are because of possible scoping and dangling reference problems. This is not the case, the limitations are there to allow the use of displays in the implementation without a lot of trouble. Alsys in particular argued very strongly that if the language design made it hard for them to maintain the use of displays, that it would be an unacceptable burden. This is actually one of the very few times that the language got restricted very specifically because of a very specific implementation approach. It is a bit ironic that in fact the old Alsys technology died anyway (to be replaced by the Intermetrics front end). I am not sure what other Ada 95 compilers actually do. GNAT uses a static chain, and it is trivial from an implementation point of view to eliminate the restrictions. Indeed the 'Unrestricted_Access attribute in GNAT allows complete freedom in the use of procedure pointers, but of course it is not protected against dangling pointers. It is of course possible to design a safe feature along the lines that Van Snyder suggests, and once again we are in the reinventing the wheel mode. I would *strongly* suggest that before you get into the lets-add-this-feature to Ada, you look at the earlier mapping documents, where many of the obvious ideas, including this one, have been explored already. Robert Dewar