8 ms·
I don't know why, but take it as a signal that it this isn't as interesting to the HN community. If you think about it, it's not avoiding null checks, it's jus
by bfung 13y ago
I don't know why, but take it as a signal that it this isn't as interesting to the HN community.
If you think about it, it's not avoiding null checks, it's just moving it to a different place. The null check still needs to happen in order to know when to call the block, it just happens to be in the datasource.whatever code.
- masklinn 13y agoThe point is to move the check out of the library user's way, and out of his ability to forget about it. Same as block-scoped resource patterns (RAII, context managers, unwind-protect, whatever).