3 ms·
Re: the shopping cart example > This approach is good for now. But, it will limit you later. Your code will quickly get out of control. Will it? If we need to
by tlonny 2y ago
Re: the shopping cart example
> This approach is good for now. But, it will limit you later. Your code will quickly get out of control.
Will it? If we need to be able to “delete via X”, it sure feels more maintainable to have this feature supported via an explicit, named method vs. inlining it as an anonymous closure (as recommended by the “balanced” solution).
- jampekka 2y agoYou can add deleteViaX later if you need it in the future. Usually YAGNI though.