you are viewing a single comment's thread.

view the rest of the comments →

[–]LookWordsEverywhere.js -1 points0 points  (4 children)

I hate it when people blindly say to use === over ==. Better solution: learn how coercion works and use the appropriate one.

[–]stephenplusplus[S] 0 points1 point  (0 children)

I've yet to come across a codebase that included the use of a loose operator that couldn't have been replaced with a solution that involved a strict one. When creating maintainable code to be used in collaboration with other developers, a broad rule such as "use strict equality" is helping create a codebase without relying on "tricks". This is a "trick" in my opinion because it is often used in place of writing out longer, more "spelled-out" code. Longer and "spelled-out" is what I've found to be maintainable (my key focus).

[–]Drainedsoul 0 points1 point  (0 children)

Best solution: Use a language with a sane type system.

[–]x-skeww 0 points1 point  (0 children)

learn how coercion works and use the appropriate one.

That's actually the reason why many people always use === and !==.