3 ms·
So... what even is the purpose of computer language abstractions? To provide building blocks useful for the construction of programs. There's a number of prop
by jmull 1y ago
So... what even is the purpose of computer language abstractions?
To provide building blocks useful for the construction of programs.
There's a number of properties that are good for such building blocks... composability, flexibility, simplicity, comprehensibility, etc.
Naturally, these properties can conflict, so the goal would be to provide a minimal set of interoperable building blocks providing good coverage of the desirable properties, to allow the developer can choose the appropriate one for a give circumstance and to change when needed. E.g., they could choose to use a simple but less flexible block in one situation, or a more complicated or less performant block in another.
IMO, inheritance is a decent building block -- simple and easy to understand, though with somewhat limited applicability.
We can imagine improvements (particularly to implementation) but I think it got a bad rep mostly due to people not understanding its uses and limitations.
...I've got to say, though, if you aren't figuring out how to use the simple and easy tools, you're really not going to do better with more complicated and capable tools. People hate to admit it, but the best of us are still highly confused monkeys haphazardly banging away at keyboards, barely able to hold a few concepts in our heads at one time. Simple is good for us.