Choose Delegation Over Inheritance, Really ?! By Venkat Subramaniam

Поділитися
Вставка
  • Опубліковано 14 сер 2023
  • We all have read good books that tell us to choose delegation over inheritance. Yet, we often choose inheritance? Why is that?
    In this presentation we will discuss the reasons, from the OO design point of view when we should choose inheritance and when we should choose delegation. Then we will discuss why we tend to lean towards inheritance. We will then model a problems to use delegation, using Java (plus some libraries), Groovy, and Kotlin and achieve fluent implementations of delegation. We will conclude with good recommendations on when to choose which approach.

КОМЕНТАРІ • 2

  • @user-ev9jg6ts6e
    @user-ev9jg6ts6e 3 місяці тому +1

    "Do not force yourself to use inheritance just for reuse of code"
    Excellent!

  • @seshasaivenkat
    @seshasaivenkat 9 місяців тому +1

    Fantastic as always Venkat Sir