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 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Idea for Ada 200x: Arguments that are procedures Date: 1998/07/07 Message-ID: #1/1 X-Deja-AN: 369335449 References: <6nh9f0$66i@netline.jpl.nasa.gov> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1998-07-07T00:00:00+00:00 List-Id: In article swhalen@netcom.com (Steve Whalen) writes: > Also interesting is the thread you attached, especially the note that > this is the only thing that keeps Ada95 from being a proper superset > of Pascal! I guess that's one reason that Ada95's lack of downward > closures feels so "wrong" to me. Ada 83 and Ada 95 both support downward closures through use of generics. A few years ago I wrote some test programs not only to verify that the language rules permitted it, but that the implementations that used displays and/or shared generics got it right. At that time I talked to the implementors, in particular R&R about how they implemented the feature, and found that, with a generic instantiation, there is enough of a flag that something unusual is happening that they didn't have to save and store contexts on every procedure call, just when a generic is instantiated in an inner scope, and the instantiation has a subprogram parameter, and that parameter is from a nested scope. Since the feature is "in there" for when it is needed, I saw no reason to continue the fight for a simpler syntax. (Jean Pierre Rosen was the first AFAIK to point out in an Ada 9X context that generics could be used to implement downward closures, at the meeting in Switzerland. But there were Ada 83 validation tests that required that it work there, so all compilers I tested implemented it correctly.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...