vimarsana.com


A Look at Kotlin's Delegation
A look at the Delegation Pattern in Kotlin.
by
Join the DZone community and get the full member experience.Join For Free
Kotlin offers many exciting features. In general, developers tend to cite null safety as their favorite. For me, it's function extensions. But delegation comes a close second.
The Delegation Pattern
GoF book:
Delegation is a way to make composition as powerful for reuse as inheritance [Lie86, JZ91]. In delegation,
two objects are involved in handling a request: a receiving object delegates operations to its
delegate. This is analogous to subclasses deferring requests to parent classes. But with inheritance, an inherited operation can always refer to the receiving object through the

Related Keywords

,Object Oriented Programming ,Java ,Design Patterns ,Elegation Pattern ,Kotlin ,பொருள் ஓரியெந்‌டெட் ப்ரோக்ராமிஂக் ,ஜாவா ,

© 2025 Vimarsana

vimarsana.com © 2020. All Rights Reserved.