3 ms·
> Ideally, good object-oriented code should always prefer Really what I'm referring to is a language which outlaws instead of one that leaves it up to preferen
by tel 12y ago
> Ideally, good object-oriented code should always prefer
Really what I'm referring to is a language which outlaws instead of one that leaves it up to preference. And by outlaw I don't mean entirely, but instead a language which requires the programmer explicitly opt into these richer domains as they are needed.
My understanding is that while these principles are understood as valuable, OO is generally constructed as too permissive to enforce them.
In a similar story, unbounded recursion is generally "bad" in almost every part of a program---nobody likes mysteriously hanging programs---but only total languages have a formalism which allows you to profitably outlaw it.
So I'm convinced there are the beginnings of the theory of objects lurking around out there even if they rarely see the light of day (really) in practice. But I also recognize that modern functional semantics grew over the last 80 years. I don't think (maybe I'm wrong) that the whole package of OO has had so long to mature.