From: Wes Groleau <wesgroleau@despammed.com>
Subject: Re: Announce: The Ultimate SI Units Cracker
Date: Fri, 13 Sep 2002 10:20:09 -0500
Date: 2002-09-13T10:20:09-05:00 [thread overview]
Message-ID: <3D820229.E1B1BEC8@despammed.com> (raw)
In-Reply-To: uo1imuh9d82d8f@corp.supernews.com
Randy Brukardt wrote:
> Wes Groleau wrote in message <3D809F51.299A6634@despammed.com>...
> >Ada 95 .... 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.
But they do for 'Write & 'Read, so why not for others?
> >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).
Thanks for the link.
> >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.)
I can see where literals would be difficult. But if you can
declare a local type called Float, why can't you instead call
a local function called Float? In the case of ambiguities....
I guess I'd better follow the link before I say any more.
--
Wes Groleau
http://freepages.rootsweb.com/~wgroleau
next prev parent reply other threads:[~2002-09-13 15:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-12 8:11 Announce: The Ultimate SI Units Cracker Grein, Christoph
2002-09-12 10:14 ` Preben Randhol
2002-09-12 10:50 ` Jeffrey Creem
2002-09-12 14:06 ` Wes Groleau
2002-09-12 17:06 ` Randy Brukardt
2002-09-13 15:20 ` Wes Groleau [this message]
2002-09-13 20:54 ` Randy Brukardt
2002-09-13 22:09 ` Dmitry A.Kazakov
2002-09-13 15:26 ` Wes Groleau
2002-09-15 6:21 ` Dmitry A.Kazakov
2002-09-15 0:24 ` Mark Biggar
2002-09-16 1:35 ` Dmitry A.Kazakov
-- strict thread matches above, loose matches on Subject: below --
2002-09-12 11:51 Grein, Christoph
2002-09-12 11:59 Grein, Christoph
2002-09-13 4:53 Grein, Christoph
2002-09-13 14:34 ` Ira Baxter
2002-09-13 20:50 ` Stephen Leake
2002-09-16 10:22 ` Fraser Wilson
2002-09-13 15:41 ` Wes Groleau
2002-09-13 5:34 Grein, Christoph
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox