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.4 required=5.0 tests=BAYES_00,FAKE_REPLY_C, MAILING_LIST_MULTI autolearn=unavailable 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 05:12:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!freenix!enst!enst.fr!not-for-mail From: Mike Brenner Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) Date: Tue, 11 Dec 2001 08:11:53 -0500 Organization: none Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1008076322 76591 137.194.161.2 (11 Dec 2001 13:12:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 11 Dec 2001 13:12:02 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Mailer: Mozilla 4.78 [en]C-20010724M (Windows NT 5.0; U) X-Accept-Language: en Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:17746 Date: 2001-12-11T08:11:53-05:00 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? It seems that the benefits of a fully orthogonal implementation of generic (making them second-class objects by permitting passing object to objects) outweigh the benefits of keeping compatibility with all existing bodies. 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. 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. The disadvantage would be that certain programs might no longer compile, for example, if they used a feature of Linux that COM-objects did not implement. It seems to me that this disadvantage, detected at compile time, might make up for the advantage? Also, of course, making packages second class objects like that would be the penultimate step towards eventually making package first-class objects.