(no title)
pcwelder | 5 months ago
What happens is you get an error. So you immediately know something is wrong.
Javascript goes the extra mile to avoid throwing errors.
So you've 3>"2" succeeding in Javascript but it's an exception in python. This behavior leads to hard to catch bugs in the former.
Standard operators and methods have runtime type checks in python and that's what examples in the article are replicating.
recursivecaveat|5 months ago
watwut|5 months ago
Javascript was a prototype that was supposed to be refined and cleaned. Then management said "we will ship it now" and it was shipped as it was.
At the time, they thought it will be used for small things, minor snippets on web page. Webapps as we have them were not a thing yet.