From: Tom Werner Date: 2006-12-14T07:17:43+09:00 Subject: Re: How to overload the operator !=? Robert Klemme wrote: > On 13.12.2006 20:33, Tom Werner wrote: >> And upon reflection, this makes sense, as in any sane world !(f1 == >> f2) will equal (f1 != f2), and so redefining != would be redundant. > > It's been a long day and I'm not sure whether my logic fails me here, > but - from the above seems to follow that C++ is potentially insane. > Not that I didn't know that before - but it's a nice outcome of a > thread about operators. :-) > Half-way related amusing anecdote (from http://rollerweblogger.org/roller/entry/arguing_with_scott_meyers): "Speaking of arguing with Scott Meyers... I worked at one of those phone company research labs back in the 90's and we had enough money to bring in Scott Meyers to teach us all about C++. Scott was explaining how you can overload operators and you can even overload the equals sign, when one student raised his hand. The student explained that there were some situations in telecommunications systems where A was equal to B, but B was not equal to A. Scott immediately objected, of course, but the student went off into some jargon-filled explanation of his particular problem domain. Scott let the student finish and then said, "if you were to overload the equals operator so that A was equal to B, but B was not equal to A, then /I would want to kill you/." That was the end of the argument." Tom