Re:Be wary of functions which take several parameters of the...
by lonelappde on Friday September 27, 2019 @01:52PM
(#21094453)
How is writing extra boilerplate tests better than saying what you mean in the primary code?
[ Parent
| on HN ]
Re:Be wary of functions which take several parameters of the...
by mlthoughts2018 on Friday September 27, 2019 @03:29PM
(#21095475)
It addresses exactly the cases you care about, whereas trying to bake it into designs or type system usually adds heavy restrictions that don’t necessarily have anything to do with your exact use cases.
Basically from a You Aren’t Gonna Need It point of view, doing it in tests lets you minimally address the real use case with much less risk of premature or incorrect abstraction.
In my experience, premature abstraction is one of the worst problems in business software. To contrast two far ends of the spectrum, minimalistic patchworks of gross hacking are asymmetrically way better than overhead of premature or incorrect abstractions.