Hi all,
When a construct is ambiguous, sometimes language designers will provide
a default which (they hope) does the right thing in the common case. An
example is XPath. When = is called on two sets, the semantics are that
there is at least one pair of elements (one from each set) that
John Daughtry brings up a much better example: autoboxing in Java. My
favourite corner case:
Integer x = new Integer(1000);
Integer y = new Integer(1000);
x y // Compares the underlying integers: false
x y // Compares the underlying integers: false
x == y // Compares the two objects: false