News for hackers. Stuff that matters.
Re:A Theory of Software Architecture by rsa25519 on Wednesday October 28, 2020 @03:34AM (#24916206)
Agreed. Abstractions are more mentally expensive than a single concrete idea but less expensive than many concrete ideas. When something doesn't need to be abstract, especially in a language where refactoring is easy, it should not be abstract.
Re:A Theory of Software Architecture by berkes on Wednesday October 28, 2020 @04:03AM (#24916372)
Or, how I would put it more pragmatic: the first example is a sure way towards seven slightly different mechanisms to call an Api. Per year. On a team with seven devs.
Re:A Theory of Software Architecture by mathw on Wednesday October 28, 2020 @04:09AM (#24916413)
Not doing the first example is a sure way towards either copying that function and changing it a bit because you need a slightly different call, or a function with a pile of branches in it because it needs to operate in several modes.

Both ways could go wrong. I don't care what your architectural choice is, you can still mess it up.