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,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cda33fc7f63c2885 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-18 02:47:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!isdnet!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: Overridability of _private_ predefined "=" [was Re: list strawman] Date: Fri, 18 Jan 2002 11:43:43 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1011350822 83969 137.194.161.2 (18 Jan 2002 10:47:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 18 Jan 2002 10:47:02 +0000 (UTC) Return-Path: Content-MD5: e6/T8Hl3GJyPlWdC8lJMGg== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:19041 Date: 2002-01-18T11:43:43+01:00 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