News for hackers. Stuff that matters.
Re:Why general inheritance is flawed and how to finally fix it by tm-guimaraes on Monday December 13, 2021 @06:01AM (#29538514)
In kotlin you can delegate the implementation of an interface to another object. Basically syntatic sugar for the delegation pattern.

https://kotlinlang.org/docs/delegation.html

With it, you F150 can say it implements the "movable" interface, just buy stating which field it contains that implements it, and the you can run "f150.move"

There are no comments on this comment yet.