Skip to content

Instantly share code, notes, and snippets.

@chris-martin
Created December 9, 2013 17:11
Show Gist options
  • Save chris-martin/7876084 to your computer and use it in GitHub Desktop.
Save chris-martin/7876084 to your computer and use it in GitHub Desktop.

@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.

@chris-martin
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment