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,29fe9a340e0d180d X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Depending on passing mechanism Date: 1997/10/21 Message-ID: #1/1 X-Deja-AN: 284936422 References: Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-10-21T00:00:00+00:00 List-Id: In article , Brian Rogoff wrote: > The Ada flaws in Henry Bakers papers that I personally find >just as annoying in (the non-concurrent subset of ) Ada 95 are > > (1) No out mode in functions > (2) No ability to interleave public and private parts in > package specs > (3) No mutually recursion across package specs > (4) No "downward funargs" (fixed in GNAT with Unrestricted_Access > attribute) I agree those are annoying. I don't think GNAT "fixes" number (4) properly, though. 'Unrestricted_Access is inherently unsafe -- you can create dangling pointers with it. This is unfortunate, since it's easy to design a feature that provides downward closures without that problem. Several such alternatives were proposed during the Ada 9X project. For example, limited access types. By the way, here's one of my gripes about Ada's limited types: For a non-limited record, you can initialize an object in a way that guarantees you don't forget any components: X := new T'(Comp1 => This, Comp2 => That, Comp3 => The_Other); If I add a Comp4 component to type T, but forget to modify the above assignment, I'll be told about it at compile time, which is nice. Unfortunately, there's no such feature for limited records -- aggregates are illegal. Of course, since most languages don't even *have* limited types, the above complaint has to be considered minor. - Bob