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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,447bd1cf7a88c198 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-12 14:00:06 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!newsxfer.eecs.umich.edu!uwm.edu!homer.alpha.net!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <3A4F5A4A.9ABA2C4F@chicagonet.net> <3A4F759E.A7D63F3F@netwood.net> <3A50ABDF.3A8F6C0D@acm.org> <92qdnn$jfg$1@news.huji.ac.il> <3A50C371.8B7B871@home.com> <3A51EC04.91353CE7@uol.com.br> <3A529C97.2CA4777F@home.com> <3A53CB9E.EA7CF86C@uol.com.br> <3A5466DE.811D43A5@acm.org> <932aol$ikc$1@nnrp1.deja.com> <932mi6$r2k$1@trog.dera.gov.uk> <9343b1$3g5$1@nnrp1.deja.com> <934iuf$eqv$1@nnrp1.deja.com> <937kc7$ssq$1@nnrp1.deja.com> <93c0e9$4u6$1@nnrp1.deja.com> <93e33l$tfu$1@nnrp1.deja.com> <93ekmo$a14$1@nnrp1.deja.com> <93f73f$mt1$1@nnrp1.deja.com> <93fnao$49u$1@nnrp1.deja.com> <93l6ut$pvf$1@nnrp1.deja.com> <93mqhh$4gl$1@nnrp1.deja.com> <93npfn$13d$1@nnrp1.deja.com> Subject: Re: Subprogram types vs. "limited access" (was Re: Do we need "Mission-Critical" software? Was: What to Do? X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 Message-ID: Date: Fri, 12 Jan 2001 15:58:48 -0600 NNTP-Posting-Host: 156.46.62.124 X-Complaints-To: abuse@alpha.net X-Trace: homer.alpha.net 979336651 156.46.62.124 (Fri, 12 Jan 2001 15:57:31 CST) NNTP-Posting-Date: Fri, 12 Jan 2001 15:57:31 CST Xref: supernews.google.com comp.lang.ada:3970 Date: 2001-01-12T15:58:48-06:00 List-Id: mark_lundquist@my-deja.com wrote in message <93npfn$13d$1@nnrp1.deja.com>... >I wonder, are there any (current) Ada implementations out there that >use displays for nested context? I'm not a compiler expert; what >factors constrain the choice of static link vs. display? Are there >aspects of the target that favor one or the other? I just don't know... Janus/Ada still uses displays (whether that counts as "current" I don't know). The primary reason for it, though was in the origin of the compiler: as a compiler construction class project at the University of Wisconsin. The class assignment required using displays (presumably because they were harder to understand). There never seemed to be any reason to change them. (Besides, I never quite figured out how static links are supposed to work!) The Intel processors include some instructions that were intended to be used to manage displays, but they are slower than the equivalent regular instructions, so no one uses them. Unless closures are needed (certainly the normal case), displays are quite efficient. There are a couple of obscure cases in generics that require handling closures, so Janus/Ada at least already has support for doing that. Those cases are (of course) quite expensive. But the real problem with closures and subprogram types isn't the closures, its that they pretty much make it impossible to do any sort of generic body sharing. (Unless of course you made it illegal to use them in generic bodies, but I doubt very much anyone would stand for that sort of restriction.) You could only do sharing after you've fully processed the body, while virtually every approach every implemented is based in some way on the contract. There are still a few compilers that mainly use sharing for generics (Janus/Ada is one of these), and adopting any language feature that prevented the sharing of generics would immediately make these compilers unmaintainable trash. Randy.