News for hackers. Stuff that matters.
Re:Value-Oriented Programming by hinkley on Friday August 31, 2018 @01:21PM (#17887286)
It’s a compromise between structural and nominal typing to boost code reuse without locking yourself prematurely into structural typing. It’s been tried before and has been given different names.

Personally I’m fond of it. It’s one of several ways to blur the line between “is a” and “has a” relationships. We used to go out of our way to distinguish the two (eg in UML) but it has fallen out of favor.

A coworker long ago convinced me that improvements to delegation would be coming soon to new languages and unfortunately this is one of the first times I’ve seen it happen close to the way he hoped.

Re:Value-Oriented Programming by pjmlp on Friday August 31, 2018 @04:48PM (#17888542)
Kotlin and Groovy are two languages where you get direct support for delegation.
Re:Value-Oriented Programming by sitkack on Friday August 31, 2018 @03:51PM (#17888225)
Delegation is extremely powerful, but it is easily implementable in most OO and Functional languages, no?
Re:Value-Oriented Programming by lmm on Friday August 31, 2018 @04:33PM (#17888459)
If you have to implement it by hand you end up not doing it, especially in languages where "extends" is right there.
Re:Value-Oriented Programming by didibus on Saturday September 01, 2018 @04:18AM (#17890884)
What do you mean by delegation?