I like `apply` for when you are modifying properti...
# announcements
d
I like
apply
for when you are modifying properties of a class as you initialize it, eg:
Copy code
val obj = ObjWithoutConstructor().apply {
    somePropOfObj = "value1"
}
👍 1
m
wispborne: agree with you
apply is good, for example, delegation
in which you can initialize some object, and need to return it at the end
and for builder-style objects, works great
d
yep. I use it exactly like the property initializer in C#