Hacker News new | ask | show | jobs
by tm-guimaraes 1653 days ago
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"