Is there a didSet/willSet analog in Kotlin?
Although Kotlin doesn’t provide a built-in Swift-style solution for property changes observation, you can still do it in several ways depending on what your goal is. There is observable(…) delegate (in stdlib) that allows you to handle the property changes. Usage example: var foo: String by Delegates.observable(“bar”) { property, old, new -> println(“$property has changed … Read more