[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: overloading __lt, __le to return a userdefined object
- From: David Kastrup <dak@...>
- Date: Fri, 20 May 2011 13:42:21 +0200
"Mustafa K. Atlihan" <email@example.com> writes:
>> And if so, why not 'overload' the other comparison operators, 'and' and
>> 'or' ??
> I would agree. All logical operators could/should have that
> flexibility, no particular reason to single out 'and' or 'or'.
Since the behavior of short-circuit operators can't sensibly be emulated
by a function, there is no good point to overloading them: overloading
should not change the semantics of an operation.
> Btw, I am new to this group so I am not sure what to expect from the
> developers based on todo requests appearing here. Any feedback on what
> I should not be expecting?