comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Renaming Fixed Point Mutiplicative operator in Ada 95
Date: 1998/05/22
Date: 1998-05-22T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.98May22150825@spectre.mitre.org> (raw)
In-Reply-To: dewar.895754578@merv


In article <dewar.895754578@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

 > In the Ada 95 design, it seemed quite nice to allow the conversions to
 > be omitted for an assignment like the above one, and we all agreed, but
 > at the time *no one* realized that we were introducing a nasty non-upwards
 > compatibility. I for one (and I suspect others) would have been opposed
 > to this convenience frill if we had known it would introduce an
 > incompatibility.

   I think that I remember a version of the preference rule that got
this wrong--under no circumstances do you want to prefer operators
returning _universal_fixed_--and I thought there was a corrected
version which got this right.  Sigh!

 >    2. Include the feature, but add a special preference rule to
 >	   maintain compatibility.

   I could be sold on fixing this correctly, but I would want to be
sure that the new preference rule didn't do unanticipated harm.

 > To explain this further, you can of course encapsulate your fixed-point
 > type within a record, and then of course you can define your own "*",
 > but then you lose literals.

   Depends on how brave you are.  Paragraph 3.5.6(8) allows an
implementation to provide non-standard real types for just this
purpose.  You could modify GNAT if you felt up to it, or I'm sure if
you ask your compiler vendor nicely, he will give you a quote.  Don't
be surprised if it is pretty high--the testing required could be
fierce, even if the implementation is simple.

   Non-standard integer types are also allowed, see RM 3.5.4(26), and
I keep expecting to see implementations use such a type for
System.Address.
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  reply	other threads:[~1998-05-22  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-19  0:00 Renaming Fixed Point Mutiplicative operator in Ada 95 Stuart Hutchesson
1998-05-19  0:00 ` Matthew Heaney
1998-05-20  0:00   ` Robert Dewar
     [not found]     ` <matthew_heaney-ya023680002005981908570001@news.ni.net>
1998-05-21  0:00       ` Robert Dewar
1998-05-22  0:00         ` Robert I. Eachus [this message]
1998-05-23  0:00           ` Robert Dewar
     [not found]       ` <01bd84c3$47215d60$440029a1@m00rq900>
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00           ` Simon Pilgrim
1998-05-21  0:00             ` Matthew Heaney
1998-05-22  0:00               ` Robert I. Eachus
1998-05-22  0:00           ` Rod Chapman
1998-05-22  0:00             ` John McCabe
1998-05-22  0:00           ` Stuart Hutchesson
1998-05-22  0:00             ` Matthew Heaney
1998-05-23  0:00             ` Robert Dewar
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney
1998-05-21  0:00       ` John McCabe
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox