I’ve not used Kotln Delegation before since I don’...
# announcements
j
I’ve not used Kotln Delegation before since I don’t fully comprehend what it’s useful for. Is it correct to state that delegation allows you to delegate execution in the same way that a proxy can delegate execution to 1 or more implementations of a class ?
1
s
janvladimirmostert: its useful for many things. check out the lazy, observable, and notnull delegates built in.
also it’s great for composition over inheritance. instead of extending classs and overriding 1 method, you can delgate to it for a few methods, and then do your own logic before delgating. and you get to do that with very little boilerplate (where as in java delegate/wrapping classes is boilerplate heavy)