comp.lang.ada
 help / color / mirror / Atom feed
* Re: Overridability of _private_ predefined "="  [was Re: list strawman]
@ 2002-01-18 10:43 Christoph Grein
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Grein @ 2002-01-18 10:43 UTC (permalink / raw)


Please, before going into further discussions about reemergence of predefined 
operations and thinking about changing the language, read the corresponding 
chapters in the AARM (the Annotated Ada Reference Manual), e.g. AARM 
4.5.2(24a-c).

With respect to "block compare", this is not possible for tagged types, floating 
point types if there are signed zeros, and who knows for which other cases.

Thus it is generally a bad idea to override predefined operators for non-tagged 
types. If this is really necessary, then utmost care has to be applied 
everywhere such a type is used (e.g. as components of an array).

Reemergence has been introduced in the first place to avoid incompatibilities 
with Ada83.

Christoph Grein

> Its even worse than just that.  Now a "block compare" of any composite
> type
> that has a nontagged private type as a componant is questional because
> that
> comparison will utilize the predefined "=" of the private type even
> though
> the creator of the private type may have seen it proper to overridden
> it.
> 
> There was a thread, gosh, I guess less than two years ago where I was
> trying to
> argue that this was a disaster wrt generics and that reemergence of "="
> seemed
> to be a special case wrt the whole reemergence issue.   I now feel that
> the
> situation is very bad in general as opposed to being bad only wrt
> generics.
> 
> Does anyone think that it would be good for there to be a change in the
> language such that for private types, if a primative "=" returning
> boolean exists then it
> should be the "=" used as part of block compares and that the predefined
> one
> should not reemerge in generics?  This would not have been incompatible
> with
> Ada83, right?
> 
> I hope that the above is not perceved as rehashing old arguments - I do
> not
> remember the issues having been discussed exactly as above.
> 
> Vincent Marciante




^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: RE: list strawman
@ 2002-01-08 19:54 Steven Deller
  2002-01-08 20:46 ` Ted Dennison
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Deller @ 2002-01-08 19:54 UTC (permalink / raw)
  To: comp.lang.ada

> -----Original Message-----
> From: comp.lang.ada-admin@ada.eu.org 
> [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Ted Dennison
> Sent: Tuesday, January 08, 2002 10:32 AM
> To: comp.lang.ada@ada.eu.org
> Subject: Re: RE: list strawman
> 
> Since we have a "Splice", I can't really sit here and argue 
> that its inverse function has no business being there. But 
> I'd like to hear a few concurrances that it needs to be in 
> there before changing things.

Ted,
Actually, a "split" is not necessary if there is a way to compare two
iterators to see if they are pointing to the same item -- in that case,
the left and right partitions can simply be the list portions before,
and after a given iterator.

Of course that means the algorithm will need O(lnN) iterators, which is
another difficulty in the current interface.  I'm not sure why there
needs to be a limit on the number of iterators.  For any operation that
has to check consistency across all iterators, just traverse a "list" of
the iterators (such a list being a locally defined and used list).

>From my "usability" view, the interface now has 3 flaws:
  1. No "split" list into two lists
  2. No "compare iterators" (at least not that I recall)
  3. Limited number of iterators

Regards,
Steve




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-19 22:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 10:43 Overridability of _private_ predefined "=" [was Re: list strawman] Christoph Grein
  -- strict thread matches above, loose matches on Subject: below --
2002-01-08 19:54 RE: list strawman Steven Deller
2002-01-08 20:46 ` Ted Dennison
2002-01-08 21:21   ` Stephen Leake
2002-01-08 21:49     ` Ted Dennison
2002-01-09  9:21       ` Thomas Wolf
2002-01-09 17:42         ` Mark Lundquist
2002-01-18  9:15           ` Overridability of _private_ predefined "=" [was Re: list strawman] Vincent Marciante
2002-01-19 16:58             ` Vincent Marciante
2002-01-19 22:42               ` Nick Roberts

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