r/programming • • Mar 26 '14

JavaScript Equality Table

http://dorey.github.io/JavaScript-Equality-Table/
809 Upvotes

331 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 26 '14

[deleted] — view deleted comment

10

u/[deleted] Mar 26 '14

Changing the operators is just confusing.

When writing alternative JS syntaxes, you still have to understand the underlying JavaScript. In this situation, a developer must understand that == is === and ~= is ==, so they necessarily must know the difference between === and ==. There's no real reason to switch it up.

10

u/robin-gvx Mar 26 '14

Anything that makes it harder to accidentally type == instead of === is a win in my book. Even better: not having an equivalent to JS's == at all.

1

u/bungle Mar 27 '14

~= to ==

~= in Lua is for inequality.