2 ms·
> the moral panic about JavaScript on the web is endless because some jerks are out there doing it wrong To be fair, the language allows them to do it wrong by
by blotter_paper 7y ago
> the moral panic about JavaScript on the web is endless because some jerks are out there doing it wrong
To be fair, the language allows them to do it wrong by default with all that implicit type conversion and whatnot -- even in the original equality operator! You can write good JavaScript, but you have to purposefully avoid weird behavior that just isn't present in some other modern languages like Python and Ruby. JavaScript had a weird history, got expanded upon accidentally (i.e. through some browser vendor or another deciding to implement something) many times, and has always valued backwards compatability more than languages that feel comfortable expecting the user to install the relevant runtime.
- strbean 7y agoPython has > a = 100 > a is 100 True > a = 1000 > a is 1000 False
- blotter_paper 7y agoCPython stores integers above 256 as individual pieces of data, but a normal Python script doesn't. I think it's technically undefined behavior.