3 ms·
>Good abstraction does not require decompression I think there's a misunderstanding. What I'm calling decompression has nothing to do with digging into the imp
by fauigerzigerk 7y ago
>Good abstraction does not require decompression
I think there's a misunderstanding. What I'm calling decompression has nothing to do with digging into the implementation of a particular abstraction. What I mean is merely tracking down all the indirections in the public interface and breaking them down to their concrete meaning in a specific case.
Some languages allow for a lot more moving parts than others. For instance, in Java obj.otherName means that otherName is an instance variable (or theoretically a class variable) and access time is guaranteed to be constant (tbd: caveats). It's not redefinable as it is in C#, Python or Swift. So there's one less thing to track down but also less flexibility.
Or take an extreme example like Go's range loop. It's defined only for a handful of builtin data structures. When you see a range loop, you know what it does without following any further indirections. It can be extremely annoying and create a lot of friction when you have to work with custom data structures. But it can make other people's code easier to read than in other languages.
Or take something like this:
a == b
This simple expression has a far greater number of possible meanings in a language that supports operator overloading and generics than in a language that doesn't.
So transforming an expression's possible meanings into its concrete meaning is what I call decompression. There may not be a need for looking anything other than public interfaces.
Also, you're talking about abstractions purely from the perspective of users. But we are often creators and maintainers of abstractions as well when we model a particular problem.
- Jach 7y agoI think the better word you're looking for might be "reify" rather than "decompress". But there is something here that I can relate to. A long time ago I also made a comparison between various languages of "what do you have to understand to fully understand a Hello World program?" An interesting followup to that would be how much you have to understand on top of that to understand a more useful program. You might be interested in this book, Patterns of Software, which brings up the issue that inheritance in OOP isn't about reuse but about compression and how the implications of that are why it's not had that much success in following through on the "reuse" promise. http://dreamsongs.com/Files/PatternsOfSoftware.pdf http://dreamsongs.com/Files/PatternsOfSoftware.pdf