Re:Anti-If: The missing patterns (2016)
by sigotirandolas on Thursday June 28, 2018 @10:48AM
(#17417268)
Unless it’s a one-off thing, it’s also worth considering adding a cache class. This can have the advantages of further decoupling the cache and computation logic, and being able to switch the cache implementation (e.g. to use a no-op cache for debugging). It also hides the “if” by introducing a “cache pattern”:
[ Parent
| on HN ]
There are no comments on this comment yet.