4 ms·
I disagree and think is the other way around. The TFA shows several examples of code that someone learning the language would definitely hit. Most of the time
by moralestapia 3y ago
I disagree and think is the other way around.
The TFA shows several examples of code that someone learning the language would definitely hit. Most of the time JS "quirks" are due to code that is so complicated that the actual WTF is on why would someone design such code in the first place.
- thrdbndndn 3y agoReally? To me most of JS quirks are things like `(1 == '1') == true`. Or why there are both `for .. of` and `for .. in`. Maybe you're just too familiar with the language to forgot about these things.
- moralestapia 3y agoJust use '===' and all these "quirks" go away. Or learn the proper semantics for false-ish/true-ish (takes about 20 mins.) and you're on the other side. The Python ones are abhorrent, here's a few of them: * the 'is' operator behaving differently, even when called with operands of the exact same type? * (from TFA) # This will print True or False depending on where you're invoking it (python shell / ipython / as a script) (WHAT?!) * No multi-line lambdas because that makes the AST unparseable, literally. Then cover it up with some shit argument about how ackchually is more "pythonic" to only use one line functions, lol.