Giovanni Montano wrote:
Liutauras Vilda wrote:Could you bring us to context please, so we could possibly join?
You are absolutely right, I apologize if I am abstract but do not want to mix objective lack of documentation issues with my personal lack of composition/inheritance architectural concepts.
I will come back to you in few days, formulating better what exaclty I think everyone is missing, at my advice documentation is missing some chunk
Now I gained more solid insights. Basically the Delegation in Kotlin comes from the Delegation Design
Pattern. And is made to make the coding more scalable, and implement new features without going up and down the heritage tree of classes that extend each other. Favoring composition over inheritance is a well known coding principle, and this is the reason why we find delegation in Kotlin, that has some kind of "helper methods" to facilitate real life scenarios where delegation could be used, like the lazy instantiation for instance.
A context as suggested by Liutauras would be an Adapter (a View in Android) that has different layouts( depending by the business logic behind in the presenter in a typical MVP easy scenario) ( MVP is an evolution of MVC for who does not know Android) With the delegate feature one can use in a clean and elegant why different layouts in this
case