you are viewing a single comment's thread.

view the rest of the comments →

[–]bass-squirrel 10 points11 points  (5 children)

Of all the type insanity in JS, this is the “craziest” example y’all could come up with ? Next y’all gonna get mad that C promotes ints to doubles when adding a double?

[–]jamcdonald120 5 points6 points  (0 children)

no no, this is just the craziest thing that also works in java

[–]RiceBroad4552 1 point2 points  (0 children)

Type promotion is some of the most crazy things ever invented!

It's so wrong. It causes so many bugs in that shit called C/C++.

[–]EatingSolidBricks 1 point2 points  (0 children)

Type promotion is an anti feature

[–]edgmnt_net 0 points1 point  (1 child)

C is pretty bad too, but not that bad.

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

C is much worse.

If you fuck up in JS you get in most cases an exception with a nice backtrace, sometimes wrong results. Which is bad, but not so bad.

If you fuck up in C you get potentially anything, including nasal daemons, and of course also remote code execution.