3 ms·
But what makes an abstraction 'right'? I would say it's if it makes the program easier to make correct, or easier to write, or easier to understand, or easier
by comex 4y ago
But what makes an abstraction 'right'? I would say it's if it makes the program easier to make correct, or easier to write, or easier to understand, or easier to maintain, or ideally some combination of all of those. But easier for whom? Some programmers may have an easier time with more abstractions to provide guardrails and reduce redundancy; others may find it more effective to have everything laid out explicitly. And of course it's not just a question of more versus less abstraction; individual programmers often have specific abstractions and design patterns that they like to reuse in many contexts.
That's not quite the same thing as 'personal preference', where the right answer is by definition whatever I think is right. It's possible for me to think that XYZ abstraction or lack-of-abstraction works well for me, when in fact there's some other approach would that work better if I took the time to learn how it worked. Maybe I just haven't heard of that approach, or maybe I'm lazy or inexperienced or don't have the time to learn. People always think they're more unique than they really are; compare to the concept of "learning styles" which keeps being debunked.
But surely there is some legitimate variation.