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


Robert Eachus said

<<   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.>>


Robert Dewar replies

At no time do I recall such a preference rule being discussed, and a quick
check of minutes and notes of relevant meetings provides no clue to what
you are referring to. As far as I know, this issue was never discussed, 
and no one realized there was a problem. This is certainly true of the
most important discussions in the ISRG. Robert Eachus may claim that he
knew about it all along, but if so, he kept it to himself :-)

Robert Dewar said

 > 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.

Robert Eachus said

<<   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.>>

Robert Dewar replies

What has this to do with anything. We are talking about Ada and what you
can do in it. Not what you can do using someone's non-standard extensions.
You might as well discuss whether you can do this in C++, it would be just
as relevant to the discussion. Note that paragraphs like 3.5.6(8) don't
say much, they are just implementation advice as to good taste. An Ada
compiler vendor is free to provide any extensions they like to the language
provided they can be turned off with a switch. 

Robert Eachus said

<<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 Dewar replies

I jolly well hope not! Such a decision would be a very bad idea, and would
explicitly violate the advice in section 13.7(37):

37   Address should be of a private type.


If you are saying that the underlying type could make use of this, I don't
see it, typically addresses are either signed (Transputer) or unsigned
(all other machines) binary integers, which can be perfectly well represented
using standard numeric types.





  reply	other threads:[~1998-05-23  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       ` John McCabe
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney
1998-05-21  0:00       ` Robert Dewar
1998-05-22  0:00         ` Robert I. Eachus
1998-05-23  0:00           ` Robert Dewar [this message]
     [not found]       ` <01bd84c3$47215d60$440029a1@m00rq900>
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00         ` Matthew Heaney
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
replies disabled

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