comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Redefined "=" = generic disaster?
Date: Thu, 02 Nov 2000 09:59:38 -0500
Date: 2000-11-02T14:59:38+00:00	[thread overview]
Message-ID: <3A01815A.75D30E9F@averstar.com> (raw)
In-Reply-To: 3A005722.7E0BC50@mail.com

Mats Weber wrote:
> 
> Robert Dewar wrote:
> 
> > [...]
> > I still don't get it, the original claim was that there was
> > something special about "=" that made things particularly
> > awkward.
> > [...]
> 
> I first wanted to shut up on this issue when I saw it reemerge. But I
> can't tell people to go to deja.com and search for it because searches
> for postings prior to May 15, 1999, are temporarily unavailable.
> 
> I think there really is a problem with the reemergence of predefined
> operations within generics, and that problem has been acknowleged by the
> Ada 95 design team: draft versions of the 9X reference manual had rules
> removing the reemergence problem, but later these rules were removed in
> the final Ada 95 RM. IMO, this was a mistake.

My current thinking is that we should have preserved the Ada 83 reemergence
rules for everything except record types.  Record types are the primary
way to implement private types, which is what really matters.  Furthermore,
because a record type might contain a tagged type with a user-defined "=",
the generic instantion mechanism needs to be prepared to handle user-defined
code as part of even the predefined record "=".  On the other hand, it
could be a real implementation burden to make a generic instantiation 
substitute a user-defined operator for scalar or access types.

Bob Duff and I used to say "tagged types work right" with respect to
generics.  It might be nice to generalize that to "record types work right."

As part of this generalization, it would be nice if formal derived types
would also work "right" for record types.  To minimize incompatibilities,
this would probably require that if a type were passed to a generic
formal derived untagged record type (that's a mouthful ;-), it would need
for all of its primitive operations to be mode conformant with the corresponding
operations of the specified ancestor type.  This is a pretty mild requirement,
of course.
 
> ...
-Tucker Taft
-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA



  parent reply	other threads:[~2000-11-02 14:59 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 [this message]
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
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