4 ms·
Checking for nil in the receiver function feels like an antipattern. Like checking for null this in a c++ function.
by tedunangst 6y ago
Checking for nil in the receiver function feels like an antipattern. Like checking for null this in a c++ function.
- morelisp 6y agoYes, even when I expect nil receivers because I'm adding a method to a map or slice type, checking for nil is usually the wrong pattern (vs. 2ary lookup or len, etc).