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/20
Date: 1998-05-20T00:00:00+00:00	[thread overview]
Message-ID: <dewar.895707841@merv> (raw)
In-Reply-To: matthew_heaney-ya023680001905982254370001@news.ni.net


Matthew says

<<(start of quote)
   function MultFixed (LEFT : NewFixed; RIGHT : NewFixed) return
NewFixed ;
(end of quote)

This is a very misguided thing to do.  Please, do not do this.
>>


What is misguided here is Matthew's entirely odd view about defining
your own operators for fixed-point. Of *course* you may want to do this
for many good reasons, one of which was alluded to in the original
question (another good reason would be to provide modular fixed-point).

The fact that Ada 95 has introduced a nasty incompatibility here is
very irritating. In practice this is one of the really nasty upward
non-compatibilities, and often there is no very simple fix that does
not involve lots of changes to a program.

THe abstraction model of Ada depends on the idea of being able to
override the predefined stuff in a uniform manner. The fact that
you can easily and clearly define "*" on all types except fixed-point
types is definitely a non-orthogonal irritation.

Of course this should not for a moment suggest the extreme reaction of
the original poster, who seems to think that this is a bar to the use
of fixed-point. There are a number of perfectly straightforward alternative
ways to solve the problem. The most irritating case is existing legacy
code, since of course the quoted original program was legal in Ada 83.





  reply	other threads:[~1998-05-20  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 [this message]
     [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
     [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         ` Matthew Heaney
1998-05-21  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