7 ms·
At least in javascript, it tells you if things are equal or not. In python, apparently you could answer if A is equal to B with "beans" or 17 or ['a']
by voidUpdate 3mo ago
At least in javascript, it tells you if things are equal or not. In python, apparently you could answer if A is equal to B with "beans" or 17 or ['a']
- hmry 3mo agoNever understood this complaint about operator overloading. In any language, a function called `isEqual` could wipe your hard drive and replace your wallpaper with a photo of a penguin. Therefore, letting programmers pick the names of their functions is bad? No, obviously naming things for least surprise is the programmer's responsibility. But when it's the symbols `==` instead of an ASCII name, it's a problem in language design? (FWIW in Javascript, being unable to override == is actually a problem when you want to use objects as Map keys)