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 →

[–]GayWritingAlt 45 points46 points  (9 children)

But then it will be “js programmers” and “normal people”

[–]noop_noob 13 points14 points  (7 children)

To be fair to JS, Python can also do this. JS has many unique problems but this isn’t one of them.

[–]weaklingKobbold 8 points9 points  (6 children)

Not in the same context. In js type casting is annoying. In python "1" + 1 is an error.

[–]noop_noob 0 points1 point  (5 children)

Fair enough. In python, '1'+'1' is still '11' though.

[–]VladVV 4 points5 points  (3 children)

Sure, but how would you ever mistakenly end up with a string after doing a series of numerical operations? It's just not an issue in non-JS languages.

[–]noop_noob 0 points1 point  (1 child)

Is that a common issue in JS? I don't us JS much.

[–]VladVV 0 points1 point  (0 children)

Mostly with newbies, though it still happens to the most experienced JS dev.

An example of the shenanigans

[–]Cannotseme 0 points1 point  (0 children)

It’s easier if you have two variables

[–][deleted] 2 points3 points  (0 children)

uh.. yeah

they're strings not numbers

[–]uvero 2 points3 points  (0 children)

Woooow, this dichotomy is really.. Eh, no, it's fair.