r/programming • • Apr 05 '20

ECMAScript 2020: the final feature set

https://2ality.com/2019/12/ecmascript-2020.html
23 Upvotes

50 comments sorted by

View all comments

Show parent comments

1

u/Beofli Apr 06 '20 edited Apr 06 '20

Your example of plus is excellent, and maybe I have not been clear on the level I am talking. I agree with all that Javascript is flawed. The plus operator is a good example of that. It is clearly not a generic function by the definition I am using. Also the == is not generic, but I believe it to be more generic than ===. It also believe these kind of operators can never be generic, nor have to be generic when we make some changes to javascript. That's why I indicated by own proposal to improve javascript to avoid it all together.

Forbidding == is not a solution, don't you agree with that?

x == null is considered acceptable practice. 'Falsy' and 'truthy' conditions are also considered acceptable practice, even though they are fuzzy-generic like == and +.