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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 11:56:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3C151381.245413EB@sparc01.ftw.rsc.raytheon.com> From: Wes Groleau Reply-To: wwgrol@sparc01.ftw.rsc.raytheon.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) References: <11bf7180.0112070815.2625851b@posting.google.com> <9v0crt$bo2bi$1@ID-25716.news.dfncis.de> <3C14EF19.76C85864@sparc01.ftw.rsc.raytheon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 10 Dec 2001 14:56:49 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1008014213 151.168.144.162 (Mon, 10 Dec 2001 13:56:53 CST) NNTP-Posting-Date: Mon, 10 Dec 2001 13:56:53 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:17705 Date: 2001-12-10T14:56:49-05:00 List-Id: Mark Lundquist wrote: > > I've seen generics that were legal (in the sense of compiling) > > but where the compiler was capable of rejecting particular > > instantiations. > > Oh sure, that happens... it's as common as rocks, actually. > > But the compiler only has to look at the generic *spec* to determine this. > What you *never* see today, and what we'd really like to avoid in any > language revision, is this: you make a change to the generic *body*, the > change is legal (the generic body compiles), but suddenly one or more > *instantiations* become illegal as a result. That is the problem I'm > talking about with units. That is undesirable, but it did exist in Ada-83. > > I've also seen instantiations where the illegality > > was detected at run-time. My memory is fuzzy on the details, though. > > Not by a conforming implementation :-). RM 1.1.5(3) prohibits an illegality > from being detected at "run-time", i.e. by the execution (as defined in I think it was the case I mentioned earlier. The generic body was legal for some instantiations but not for others. Since the instantiation had already happened, only needing the spec per LRM, the problem raised an exception at run-time instead of forcing a recompile of all instantiations. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau