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,99ab4bb580fc34cd X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Q: access to subprogram Date: 1996/07/09 Message-ID: #1/1 X-Deja-AN: 167588565 references: <4rb9dp$qe6@news1.delphi.com> <4rr5tu$sap@watnews1.watson.ibm.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-09T00:00:00+00:00 List-Id: "While the lack of direct support for recursive types across package boundaries and lack of assertions are more important (IMO) goofs, and while the evinced reasons for the latter one are mind numbingly incomprehensible, this latest example would appear to take the crown for the most stupefying goof." One interesting question to ask is how people are using Unrestricted_Access in GNAT. During the discussion of this issue in WG9, we did have some examples that purported to show the importance of this issue (I am including Bill Taylor's discussion of iterators), but they were unconvincing, since there seemed to be alternative expressions that were quite acceptable (the final vote on this issue was unanimous by delegations as I remember, which means there was no strong advocate for keeping the feature -- there certainly were some energetic arguments over an extended period of time -- but by the end, everyone was convinced. Now the difficulty with arguing by example is that of course you don't know if you have found the critical examples or not. Note that the entertaining thing about Jon labeling this as a stupefuing goof is that in the message *just* before this one, he declared that real programs have no nesting anyway, and of course all this business about closures is irrelevant nonsense in programs that don't have any nesting! So, the intersting question is: are there examples that people are running into, involving nesting of course, since otherwise the issue does not arise, where the use of Unrestricted_Access in GNAT seems really critical. I must say I implemented this attribute because it fell out literally free to do so (the real thing I needed was an access attribute that did not require aliased, but the procedure case just fell out), not because I had a critical use in mind, but I certainly have found some uses for it, none that I would label as critical. But if someone can present some really nice example where the use of Unrestricted_Access is critical, that would be interesting.