Re:The Second Edition of “Refactoring”
by endgame on Sunday December 02, 2018 @01:01AM
(#18581059)
Thinking more about this, null object are meant to be neutral with respect to some behaviour, but that behaviour isn't really specified alongside the object. It seems like it's a weaker reinvention of the idea of an "identity element" from e.g., the `Monoid` typeclass. I say "weaker" because `Monoid` specifies the neutral element (`mempty`) alongside the behaviour (`mappend`), whereas the null object pattern does not.
[ Parent
| on HN ]
There are no comments on this comment yet.