`parseFloat("foo") == parseFloat("foo")` and `parseInt("foo") == parseInt("foo")` in Javascript evaluate to false which is the sane thing to do. `NaN != NaN` is part of the IEEE 754 floating point standard, which predates every single one of the languages you mentioned.
We're all competing in the olympics of suffering, so none of us should be promoting this shit :)
https://en.m.wikipedia.org/wiki/Undefined_behavior#Examples_...
jshell> Long a = 12l; Long b = 12l;
a ==> 12
b ==> 12
jshell> a == b
$3 ==> true
jshell> a = 54321l; b = 54321l;
a ==> 54321
b ==> 54321
jshell> a == b
$6 ==> false
¯\_(ツ)_/¯Terms like boxing and reference comparison come to mind but I can't stitch them into a narrative to explain this.
https://stackoverflow.com/questions/1700081/why-is-128-128-f...
If you explicitly ask for a new object (Long a = new Long(123l);) you will get a new object and the comparison will fail as expected.
The moral of the story is to always use .equals().
https://medium.com/@mikehall314/wat-s-happening-a-closer-loo...
Of course the language can require an explicit cast, but in most cases it goes against the intuitiveness and simplicity that dynamic languages want to achieve.
If you look hard enough, you'll probably find some site that shows surprising behaviors of your favorite language. Examples:
Python: https://github.com/cosmologicon/pywat
Javascript: https://loomcom.com/blog/0097_the_wats_of_javascript.html
Ruby: https://idiosyncratic-ruby.com/29-limitations-of-language.ht...