Add on the fact that people somehow seem to think Alan Kay has some insights (even if they can never tell you what they are), and Bob's your uncle.
Add on the fact that people somehow seem to think Alan Kay has some insights (even if they can never tell you what they are), and Bob's your uncle.
What do you mean by "delegation" here?
> Until recently non-OO languages had very little support for delegation
No they don't. Show me how you'd do that in e.g. Haskell. And note that Rust has `delegate` as a macro even though it has a trait system.
Or with a record you just explicitly implement typeclass methods in reference to the contained data.
If you mean doing it without doing a typeclass, well the functions need to have different names. If that’s exactly what you want. In order to have the same function name you need a typeclass.
Deriving sort of does what delegation does, but in a very limited way, and even when it does work you can't use it for user-defined typeclasses, so it's not a solution to the problem except in a handful of special cases.
> Or with a record you just explicitly implement typeclass methods in reference to the contained data.
The whole point of a delegation feature is that you don't have to do this explicitly for each method.