News for hackers. Stuff that matters.
Re:Avoid Null Checks by Replacing Finders with Tellers by wpietri on Monday June 17, 2013 @03:01PM (#5895188)
We make something explicit when we want to call attention to it. Otherwise, we should make it implicit.

Attention is a limited commodity, and I think it's worth preserving for the important things. Sometimes it really is worth reminding people, "Hey, this could be null!" But a lot of the time that is boring.

To me this often comes back to favoring meaning over mechanism. The higher up I go in code, the more I want it to be about what the system means, not the particular mechanism I've chosen to make it work. E.g., Computers may be implemented via impure silicon, but most of the time we can forget that. I try to apply that to any sort of mechanism.

There are no comments on this comment yet.