@aredridel
Thought of the moment: I never use === in javascript. I find that every time I need it, I've made a boneheaded design flaw elsewhere.
@chris__martin
@aredridel === is a promise to the maintainer who comes after you that you knew what you were doing.
@aredridel
@chris__martin Heh. For me it's a signal that they didn't know what they were operating on.
I guess this is actually the same debate as
i > 0
vs.i != 0
to check whetheri
is positive in a situation where you knowi
is supposed to be a nonnegative integer. Thei > 0
school of thought says it's a good cover-your-ass strategy because it works even wheni
is negative, whereas thei != 0
crowd says that writingi > 0
is bad because it just demonstrates a lack of confidence in the constraint.