DEV Community

Discussion on: Abstraction vs. Experience/Habit

Collapse
 
kspeakman profile image
Kasey Speakman

I find higher abstractions can sometimes be tougher to use in the long term. Because the abstraction always breaks down at some level. In the end it is a trade-off that you have to decide for yourself.

For example, I use a garbage-collected language (F#). If I run into performance problems because of GC pauses, then I will have to start using tactics to avoid allocations. Like reusable pools of objects. This is basically managing my own memory but indirectly since the language doesn't provide explicit memory control. Despite this, I deem using a GC as a worthwhile trade-off for the kind of applications I normally write.

On the other hand, I avoid using frameworks of most kinds. Because long term I find them to cost more. Since all abstractions are leaky, and the bigger it is the more leaky. I eventually have to spend time learning how the framework functions under the hood, and then trying to puzzle how to invoke it in a way to accomplish what I want. All this instead of just solving my problem more directly without a framework. So I much prefer to create a solution by weaving together simpler libraries, even though a framework would be faster to get started. My perspective is shaded by the fact that I still have software in production that has evolved over the course of a dozen years.