@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.
It seems like you and I are looking at the code from different angles. You're describing a perspective of "I've received some arguments, now how can I do what the caller probably wanted", and I'm saying "I'm going to define a clear API over particular types, and a caller that doesn't use them is erroneous".
I find it easier to think within restricted types, in a smaller space. Ultimately, in that sense, I suppose the question to me is moot. Because really all we're discussing is what the program's behavior should be when the behavior is undefined, and I don't think one ought to give that any thought.