Comment

Comment by whack

I was just about to laugh at JS, when I realized you can do the exact same thing in Java also. a.equals(1) && a.equals(2) && a.equals(3) can evaluate to true, if you overload the equals method with a particularly dumb interpretation. I believe the same principle will also apply to any language that supports operator overloading, such as C++.
parent whack 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton