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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7fd5a5da28dace78 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Renaming Fixed Point Mutiplicative operator in Ada 95 Date: 1998/05/23 Message-ID: #1/1 X-Deja-AN: 355823631 References: <3561F32B.2F0B@innotts.co.uk> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 895928869 29678 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-05-23T00:00:00+00:00 List-Id: 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 <> 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.