https://kotlinlang.org logo
#feed
Title
# feed
b

bdawg.io

01/05/2020, 10:01 PM
I do find it interesting that was a controversial design choice. I could see how designs that heavily relied on inheritance could find it tedious
c

cedric

01/06/2020, 3:38 AM
I still stand by what I said on that original thread four years ago: the upside of classes being
open
by far outweighs the rare cases where extending a class will break it.
💯 3
b

bdawg.io

01/06/2020, 9:36 AM
I find myself very rarely extending classes anyways. Most of my use cases wind up being refactored to use composition or delegates. Even before I was doing that, only a fairly small portion (10-15% on an inheritance-heavy project) were classes that ever got extended anyways
c

codeslubber

01/06/2020, 3:56 PM
The article was good. Would have been better if it had gone on to show extensibility through delegation. It showed
by
used with an Interface, but an example of then replacing the implementation would have been good. I know it’s simple, if you were going to tell me that.
2 Views