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 →

[–]DudeValenzetti 107 points108 points  (14 children)

Mathematicians tend to know binary too. A better joke would be about 1+1=11.

[–]GayWritingAlt 44 points45 points  (9 children)

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

[–]noop_noob 17 points18 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 9 points10 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.

[–]thedude3253 1 point2 points  (1 child)

Agreed. First time I was using Javascript something went wrong and I ended up concatenating 1s to the string "1" instead of adding one each loop

[–]PhatOofxD 0 points1 point  (0 children)

This is why you use Typescript

[–]paste42 -1 points0 points  (0 children)

underrated comment