OOP / language design question
Diez B. Roggisch
deets at nospam.web.de
Tue Apr 25 06:45:04 EDT 2006
cctv.star at gmail.com wrote:
> I was wondering, why you always have to remember to call bases'
> constructors explicitly from the derived class constructor? Why hasn't
> this been enforced by the language?
I have another question for you: why does JAVA enforce that a constructor of
a base-class must be called prior to everything else in the derived class's
constructor? No way to do some computing for parameters that I want to pass
to the parent constructor...
Besides, this automatically base-constructor-calling only happens for the
most trivial of cases - the no-argument-constructors.
Regards,
Diez
More information about the Python-list
mailing list