3 ms·
I disagree that this makes reading code easier. It is tremendously more complex to understand a generic API precisely because it is generic - it must cater to a
by jstimpfle 4y ago
I disagree that this makes reading code easier. It is tremendously more complex to understand a generic API precisely because it is generic - it must cater to a huge variety of use cases, and consequently has more nuts and bolts, and knobs to turn.
Now this can be the right choice in many situations, when the higher cost in understanding the API is amortized over a larger number of uses. But in general I much prefer simple and specialized APIs and don't see much of a need for genericity. This includes error handling and resource allocation.