News for hackers. Stuff that matters.
Re:On over-engineering; finding the right balance by tlonny on Wednesday September 11, 2024 @04:11AM (#41509193)
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).

Re:On over-engineering; finding the right balance by jampekka on Wednesday September 11, 2024 @06:03AM (#41509829)
You can add deleteViaX later if you need it in the future. Usually YAGNI though.