From: Jeff Carter <jrcarter@acm.org>
Subject: Re: Redefined "=" = generic disaster?
Date: Sun, 22 Oct 2000 02:50:22 GMT
Date: 2000-10-22T02:50:22+00:00 [thread overview]
Message-ID: <39F255E7.38933FCC@acm.org> (raw)
In-Reply-To: 39F1DCFD.3276@li.net
Vincent Marciante wrote:
> Ugh! So _are_ you saying that the Ada 83 code was defective wrt.
Ada
> 83?
In Ada 83, you could not redefine "=" for any type that could be used
to instantiate the generic, so if you wrote "=" in the generic, it meant
you wanted the predefined "=" for the type. This is still the case in
Ada if you do not explicitly import "=". If, in Ada 83, you wanted
some other behavior than the predefined "=", you still had to import it:
with function Equal (Left : T; Right : T) return Boolean;
The only real change in Ada is that now you can use the infix "=" to
represent user-defined equality, while in Ada 83 you had to use
something less intuitive. In either language, you get the predefined
"=" if you don't import something else, and have to import something
else if you don't want the predefined behavior.
--
Jeff Carter
"Go and boil your bottom."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2000-10-22 2:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-21 6:59 Redefined "=" = generic disaster? Vincent Marciante
2000-10-21 0:00 ` Jeff Carter
2000-10-21 0:00 ` Vincent Marciante
2000-10-28 11:12 ` Robert Dewar
2000-10-29 8:43 ` Vincent Marciante
2000-10-30 3:49 ` Lao Xiao Hai
2000-10-30 18:46 ` Robert Dewar
2000-10-31 3:27 ` Lao Xiao Hai
2000-10-31 6:54 ` Vincent Marciante
2000-10-31 19:51 ` Robert Dewar
2000-11-01 17:47 ` Mats Weber
2000-11-02 5:27 ` Vincent Marciante
2000-11-02 16:52 ` Mats Weber
2000-11-02 14:59 ` Tucker Taft
2000-11-05 4:29 ` Robert Dewar
2000-11-05 4:32 ` Robert Dewar
2000-11-05 4:26 ` Robert Dewar
2000-10-21 0:00 ` Vincent Marciante
2000-10-22 2:50 ` Jeff Carter [this message]
2000-10-22 0:00 ` Vincent Marciante
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox