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,2308afbbe4ecec0b X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Subverting 'Access for Sub-programs Date: 1999/08/06 Message-ID: #1/1 X-Deja-AN: 509583406 Sender: bobduff@world.std.com (Robert A Duff) References: <37A71EF1.2201@dera.gov.uk> <37A7FDE8.4F5@dera.gov.uk> <7o9vrv$qgt$1@wanadoo.fr> <7oc5ih$6mb$1@wanadoo.fr> <7occq3$g9v$1@nnrp1.deja.com> <7ocrji$scl$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-08-06T00:00:00+00:00 List-Id: adam@irvine.com writes: > Actually, posts on this thread that I read after writing the above, > along with some lookup in DejaNews, have mostly answered my question. > However, the discussions I found in DejaNews mentioned proposals to put > restrictions on assignment of these types, but not runtime checks. Was > anything like this seriously considered? There was one proposal that involved run-time checks (see my other posting), but I'm not sure it matches the kinds of run-time checks you're thinking of. I don't think anybody ever proposed a feature where you could form a pointer to a (possibly-nested) subprogram, and then check the validity of this pointer at the call site. Such a feature would be difficult to implement efficiently. In fact, if you're going *that* far, I suspect you might as well go all the way to full closures, as in various Lisp-style languages. >...Would it be simpler to > implement than the other solutions (for implementations that use > displays)? Well, the totally-unchecked version of downward closures causes difficulty for display-based implementations, so it's hard to see how any version with checks (compile time or run time) could make things easier. - Bob -- Change robert to bob to get my real email address. Sorry.