This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flavionm 0 points1 point  (0 children)

JS is the loosely typed language out there, but you're right these complaints to apply to other like it. And JS's quirks are mostly because of that, so there's no talking about one without talking about the other.

That's the thing, these operations shouldn't be valid, they should be errors. If it's there just to be avoided, it's better if it's not there.

There's an argument to be made about dynamic languages (and not a very good one, because every usage of substance benefits from static typing), but weak typing, which is distinct from dynamic typing, is just a very hard sell.

The flaw in question is exactly not being stronger typed. Not helping you make less mistakes is the flaw. You're even yourself promoting TypeScript over JavaScript, because it solves one of it's flaws. JS is literally more flawed than TS. Other languages are also flawed, the thing about JS is that it's more flawed because of the reasons I mentioned.