Sign in Go Pro


Delegation Using Delegates.observable



Course Retired

The Introduction to Kotlin course has been retired and replaced with the very comprehensive Kotlin Programming Language course.


While writing programs, we often need to monitor changes made to the value of a variable. For this purpose, most of the time we implement custom setters and call a function from there, which can make a program quite complex.

Fortunately, Kotlin comes to our aid with the Delegates.observable delegate, which is, among the standard delegates in Kotlin.

In this lesson you will learn:

  • How the Delegates.observable delegation works
  • How to monitor a variable with Delegates.observable
  • How to use Delegates.observable with custom classes




it's not that hard to create it from scratch using functions or interfaces like the java style, I wonder why they are adding it to the kotlin core api..?

You really need to work on your English pronunciation before putting more videos online

no pun intended

Miroslav, I feel that comment was unnecessary and rude. All of our instructors come from various ethnic backgrounds and do their best to teach content in a common venacular and language (English). We have provided closed captions for this lesson which you can enable to help guide you through areas that difficult for you to understand. Please attempt to reframe comments like these or refrain from posting them if they cannot be constructive.

I wanted to know what practical use cases do Delegates.observable hold rather than debugging purposes.

Yeah I totally agree with you, and more real use cases here and before should be very useful and it'll make our learning more effective

Pronunciation :(
Halooooo: Value!

You need to go PRO to post comments.

Lessons in Kotlin