News for hackers. Stuff that matters.
Re:JavaScript Is Weird by gaganyaan on Sunday August 13, 2023 @07:46PM (#37115788)
No, JS is weird. You wouldn't write code like that exactly, you'd write "foo + (bar - baz)". Then a few refactors later, you end up with slightly different types for Reasons, then prod starts blowing up and you have the fun of tracking down why.

This weak typing is unique to a few languages like JS and PHP. Python is just as dynamic, but will at least throw an error if you try to accidentally add a string and a number. Static languages catch this even earlier.

There are no comments on this comment yet.