Re:The bigger the interface, the weaker the abstraction
by taeric on Saturday July 29, 2023 @10:13PM
(#36927098)
Totally fair. I am riffing off the idea that stronger is better. Weaker is worse. Fairly common framing, I thought
But in the spirit, how is a single method "stronger?" Usable in more places, maybe? Often hides too much, such that it really can't be used everywhere.
Describes more things? Well, yeah? But not in meaningful way. At this level of "abstraction," a car is indistinguishable from a bike. Certainly fair for some contexts. Not many relevant ones, though.
And it is that last, that I think sticks. What is the most you can stick to an abstract set of capabilities? That will give you the most utility.
It does mean the cost of implementation raises. But that is realistic?
But perhaps you feel there is an second implicit, prescriptive statement: "Your abstractions should be strong.*
And that's not necessarily true. Excessive abstraction is indeed astronaut architecture. To every thing there is a season.
---
The lesson is a good one.
The bigger the interface, the weaker the abstraction
That's not to say big interfaces are bad. It's just to say they aren't strong abstractions, so don't expect them to be.