News for hackers. Stuff that matters.
Re:The bigger the interface, the weaker the abstraction by dgan on Sunday July 30, 2023 @05:20AM (#36929370)
I have this analogy stuck with me: «Classes should be deep, not large». Which means: imagine a thin rectangle, but very tall, which stands on its thin side up; now, the X-dimension is the price you have to pay upfront to understand an abstraction ("interface") and Y-dimension is what you get once you understand it. The ratio between the two is the "leverage" you get from that abstraction.

Now imagine a perfect square: you gain as much "leverage" with your abstraction as you get functionality out of it: this the prime example of your dumb setter in Java, because it takes you exactly the same effort to learn what it's doing, as for you to do it yourself.

Again this is a picturesque analogy.

Re:The bigger the interface, the weaker the abstraction by diarrhea on Sunday July 30, 2023 @06:24AM (#36929717)
I don’t know if that book originated the idea, but your description fits closely to Philosophy of Software Design.
Re:The bigger the interface, the weaker the abstraction by henkelibonk on Sunday July 30, 2023 @07:54AM (#36930247)
Similarly, the leverage or “reusability” equals complexity of the implementation divided by size of the interface