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,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-11 09:03:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn3feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc54.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: Subject: Re: Dimensionality Checking (Ada 20XX) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: NNTP-Posting-Host: aXqR7-59129-7y-68951@rwcrnsc54 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc54 1008090221 aXqR7-59129-7y-68951@rwcrnsc54 (Tue, 11 Dec 2001 17:03:41 GMT) NNTP-Posting-Date: Tue, 11 Dec 2001 17:03:41 GMT Organization: AT&T Broadband Date: Tue, 11 Dec 2001 17:03:41 GMT Xref: archiver1.google.com comp.lang.ada:17767 Date: 2001-12-11T17:03:41+00:00 List-Id: "Mike Brenner" wrote in message news:mailman.1008076322.18644.comp.lang.ada@ada.eu.org... > Mark Lundquist said: > > 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. > > Is this the reason why non-generic packages have been forbidden as generic parameters? I don't think that's so much "forbidden" as it is "nonsensical" :-) What exactly would such a construct look like, and what exactly would it mean? >[...] > In particular, permitting non-generic package parameters would give a way to switch implementations without rewriting the code. In particular, a configuration manager could simply swap the spec and body of the package being used as a non-generic parameter to a generic, and that would change the device driver from being Linux-compatible to being COM-compatible. Well, why can't you just "swap the spec and body" of a package today? Why do you need an enhancement to generics for this? Maybe I don't understand the problem you're trying to solve... can you make your example more specific, e.g. by including a source code example for the feature you're envisioning? Are you aware of the generic "signature" idiom? Also, library-level renames? Perhaps those devices would help with what you're after...? It could be that your Linux/COM example is not particulary illustrative, since mulitplatform development is typically conducted by maintaining multiple variants, not by "switching" something back and forth... > > Now, a line of code has to be changed in order to swap devices supported, so it requires a PROGRAMMER rather than a CONFIGURATION MANAGER to make that kind of change to a large Ada system. Since I haven't seen how your feature would work, I can't see that this is true :-)... but I can see how a configuration manager might select a configuration with a different variant of a package spec and body, then rebuild to create a different system. This is in today's Ada, and it wouldn't take a programmer to do that... > Also, of course, making packages second class objects like that would be the penultimate step towards eventually making package first-class objects. > Have you been sharing LSD with Nick Roberts? Please, stop before it's too late! Also, you should know that Nick isn't even from our planet, he's really a Tenet from the planet Contar. He's the Distar of Contar, actually. You should never, ever share mind-altering substances with a Tenet, it is just too risky. Now then... please study the relationships between the concepts of type, value, and object in Ada. That is the penultimate step towards eventually understanding why your suggestion is bonkers :-). http://www.ada-auth.org/~acats/arm-html/RM-3-2.html http://www.ada-auth.org/~acats/arm-html/RM-3-3.html http://www.na.org Good luck... with everything :-) -- mark