4 ms·
While not bad advice, I feel that this post does a very poor job of explaining when and why to apply it. The original class, while certainly inefficient, expose
by achn 6y ago
While not bad advice, I feel that this post does a very poor job of explaining when and why to apply it. The original class, while certainly inefficient, exposed fields and memoizes results, the final function does not. He’s combining two pieces of advice - don’t over complicate your design, and don’t create classes for a single use function - but neither one is demonstrated all that poignantly here.