2 ms·
> I'm not arguing ergonomics, just implementation details, you can add all the syntax sugar you want :) Oh, good. That sugar actually already exists in most OO
by CRConrad 5y ago
> I'm not arguing ergonomics, just implementation details, you can add all the syntax sugar you want :)
Oh, good. That sugar actually already exists in most OO languages, and usually it's called...
class
> What problems do classes address?
The problem of getting sweet ergonomic syntax for the concepts of encapsulation, polymorphism, possibly inheritance (with additional sub-divisions mainly on whether multiple- or single-ancestor), interface, abstract class, type class, trait, structural typing, etc, etc. Currently implemented in varying combinations and to varying degrees in different languages.
So make up your mind: Do you have something against syntactical sugar for all those, or don't you?