Post

Allen Holub. https://linkedIn.com/in/allenholub
Many people have responded on the quoted thread 👇 by saying there should be a "balance" between abstraction and no abstraction within a program. Somebody, please explain to me what that would look like. Maybe I have no imagination, but I envision a few classes floating around like meatballs in a sea of spaghetti. What would the architecture of such a system look like? How exactly will you get architectural coherence? How do you get maintainability in the spaghetti? These are all mysteries to me. How is that better than a system where everything is abstracted into classes? (BTW, I'm not talking about bad programming. Unnecessary interfaces are a scourge. Classes are not.) I'd like to see a concrete example.
Allen Holub. https://linkedIn.com/in/allenholub@allenholub

I really don't understand this entire thread 👇. We have a phrase for code without abstractions: unmaintainable spaghetti.

English
12
0
6
8.6K
Andrew Milne
Andrew Milne@oatsoda·
@allenholub I suspect because your definition of abstraction differs! Yours seems to be abstraction from details? I think most would see abstraction as abstraction from technology: abstraction into interfaces.
English
1
0
0
371
Allen Holub. https://linkedIn.com/in/allenholub
The set of public methods of a class is an interface. The APIs into a service are an interface. The messages in an event-based system are an interface. Java or Kotlin or C# or whatever programmers who create a formal "interface" for every class are just bad programmers. There's no rational reason for that cruft. Abstractions all have interfaces, even if your language does not have an "interface" keyword/mechanism.
English
2
0
1
442
Void Compiler 💾⚡
Void Compiler 💾⚡@voidcompiler·
@allenholub @oatsoda Right. However, your audience is using a different more specific definition of 'interface', i.e., the explicit abstract interface definitions that are separate from the classes that implement them. This misunderstanding was the cause of your original tweet on the subject.
English
1
0
0
123
Void Compiler 💾⚡
Void Compiler 💾⚡@voidcompiler·
@allenholub @oatsoda I work with a wide range of skill levels, and frequently push back on unnecessary explicit abstract interfaces. Lots of juniors learn a pattern and want to apply it everywhere without properly thinking through what they are doing or why. It even has a name: interface-itis.
English
1
0
3
45
Paylaş