Hi Matthew,
Am Samstag, den 12.07.2008, 14:55 -0400 schrieb Matthew Weier O'Phinney:
> -- Hector Virgen <djvirgen@gmail.com> wrote
> (on Saturday, 12 July 2008, 10:41 AM -0700):
> > If Zend_Form::init() becomes protected, will it be renamed to _init()?
>
> Yes -- but such a change will not happen prior to 2.0 at the earliest,
> if at all.
I have to admit that I find the wide-spread usage of init()-methods
quite unfortunate, as they address a bad programming habit. Not calling
the parent constructor is a bad practice, as it will always break code.
I totally agree that complicated setup code do not belong in the
constructor itself, but the init()-methods are not about complicated
object setups but about allowing the user to forget about
parent::__construct(). So I would really love to see most of them go
away in 2.0.
cu, Lars
Partager