# Introduction to Class Delegation

DevFeed: [Introduction to Class Delegation](<https://devfeed.tech/articles/introduction-to-class-delegation-25053.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-delegation/>)

Author: author@typealias.com (Dave Leeds)

Published: 2023-02-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [delegation](<https://devfeed.tech/tags/delegation.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [override](<https://devfeed.tech/tags/override.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

A tutorial introducing Kotlin class delegation. It explains how interfaces and delegation let classes reuse functions and properties, using a restaurant waiter-and-chef analogy before modeling the relationship in Kotlin.

## Source excerpt

Back in Chapter 2, we introduced functions as a way to prevent us from duplicating expressions. Once we start working with classes, we might notice that it's also possible to end up duplicating our functions. There are lots of ways to reuse our functions instead of duplicating them. In this chapter, we'll see how we can use interfaces with Kotlin's class delegation feature to reuse the code from our functions and properties.