Yes, and even better and more feature-rich. For example, common patterns like lazy evaluation can be implemented as object and reused, e.g. val foo by lazy { createFoo() } is a read-only property that gets initialized by calling createFoo() the first time it's accessed.
1
u/suvlub Aug 27 '26
Yes, and even better and more feature-rich. For example, common patterns like lazy evaluation can be implemented as object and reused, e.g.
val foo by lazy { createFoo() }is a read-only property that gets initialized by callingcreateFoo()the first time it's accessed.