Safe Navigation Operator “?.” for D2 ?
Araq
rumpf_a at web.de
Sat Mar 1 05:54:47 PST 2014
>> Even if that would be true, the "refactoring über alles" OO
>> crowd
>> couldn't care less... You refactor. Problem solved. Massive
>> code
>> restructuring is embraced in the OO world because OO encourages
>> bad design like no other paradigm.
>
> Araq: could you list the problems you see in the OO world?
I could list the problems, but that would fill books. So, I'll
focus on a single aspect instead here: "Favour composition over
inheritance". This is commonly regarded as the better solution
(and I agree with it btw). Ok, fine, so we favour composition and
don't use inheritance. If we don't use inheritance we have no
subtyping either (at least in the "classic OO model") and without
subtyping we don't need dynamic binding either. In other words,
we model things as nested structs plus functions. We can attach
these functions to the structs or make them free standing but
this is only a cosmetic detail really. So what's left of OO?
Nothing! "Favour composition over inheritance" is a single big
confession that OO doesn't work...
More information about the Digitalmars-d
mailing list