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,7e60c1d99ae3ffa1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-12 10:14:37 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Announce: The Ultimate SI Units Cracker Date: Thu, 12 Sep 2002 12:06:12 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3D809F51.299A6634@despammed.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:28880 Date: 2002-09-12T12:06:12-05:00 List-Id: Wes Groleau wrote in message <3D809F51.299A6634@despammed.com>... >Ada 95 extended the concept of attributes being functions >to letting them be procedures ('Write / 'Read), and allowed >programmers to redefine/override 'Write and 'Read. I am curious >whether overriding/creating other attributes was considered. >Obviously, like operator overloading, it could easily be >used to obfuscate, but it could be very useful to be able >to define 'first and such for things like SI and Rational. It was considered for Ada 9x, but was rejected as having insufficient value for the substantial changes that would be required for compilers. Most existing Ada compilers do not put attributes in the symboltable; they do not have visibility, and so on. >It would also be nice to be able to define a type conversion. > >function Float (T : SI) return Float is .... This was discussed recently, and it was essentially proven to be impossible without major incompatibilities. See ac-00026 (http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AC-00026.TXT). >What I'm getting at is the ability to define a private type >so that it has all the attributes and operations of a numeric >type and can be use as a generic parameter to a numeric package. Someone is always dreaming about that, but no one has had anything that looks remotely like a viable proposal. (Numeric literals are always trouble, as are the type conversions.) Randy.