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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 22:32:13 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: status of Ada STL? Date: 18 Jun 2002 22:32:12 -0700 Organization: http://groups.google.com/ Message-ID: References: <4519e058.0206170753.599fd771@posting.google.com> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1024464733 31592 127.0.0.1 (19 Jun 2002 05:32:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Jun 2002 05:32:13 GMT Xref: archiver1.google.com comp.lang.ada:26353 Date: 2002-06-19T05:32:13+00:00 List-Id: Dmitry A.Kazakov wrote in message news:... > Russ wrote: > > > Immediately after the statement "x=3" executes, it becomes true in the > > mathematical sense, which is why it makes sense. > > Nope. Consider C++ having user-defined type conversions. It is very easy to > write a program in C++ that > > SomeClass x; > > x=3; > if (x==3) // false I should have been more specific. For any instance x of a built-in numerical type, the statement "x=3" becomes true in a mathematical sense immediately after it executes. (If I am wrong, please provide a counter-example.) > In fact assignment (semantic of) has nothing to do with equality. You may > have incomparable objects which can be assigned. You may have comparable > objects that cannot be assigned. You may have objects which have several > different semantics for assignment (deep/shallow copy/reference) and > equality (distance/set equality etc). That's really all irrelevant to the main point here. If you have two different objects A and B of the SAME type, then someclass A, B; A = B; if ( A == B ) ... // better be true! If this doesn't evaluate to true, you have goofy code. Yes, I realize that asignment can be overloaded in C++ in all kinds of ways, but that's really a distraction. Your claim that "assignment has nothing to do with equality" is just plain wrong. Nothing to do with it? Give me a break!