Re:Evolving Java Without Changing the Language
by jrockway on Thursday October 22, 2009 @01:46PM
(#897255)
No, he is right; however, Java has the exact problem.
The place where this code will screw up is in the logic of the comparison routine. It will be difficult for the types of x and y (or a and b in the Java example) to be wrong, but it is easy to say:
The place where this code will screw up is in the logic of the comparison routine. It will be difficult for the types of x and y (or a and b in the Java example) to be wrong, but it is easy to say:
or instead of Your tests will catch this, though.