Darren Duncan schreef:
> Dr.Ruud:

>>>    say "foo" if $x !== $y;
>>> into
>>>    say "foo" unless $x === $y;
>>
>> And how about symmetry:
>>    say "foo" unless $y === $x;
>
> Any equality or inequality operator is commutative,

If $x and $y are not of the same type, and one or both of the involved
types has its own (or overloaded?) 'deep equality operator', the choice
(which implementation is used) can depend on the order.

Not so long ago, there was an issue with Perl5 in this area (IIRC with
'==' and undef).


> so it doesn't
> matter whether you have $x and $y or $y and $x, the result is the
> same.  So you can use whichever order you want without it needing to
> be coded for. -- Darren Duncan

-- 
Affijn, Ruud

"Gewoon is een tijger."


Reply via email to