RE: [PHP] Construction

2004-06-27 Thread Michael Sims
Paul Bissex wrote: > FWIW Python also requires child classes to call parent constructors > manually. Not sure what the justification is for this design decision > is, though, in either language. Anybody? Flexibility, I would guess. With PHP's current behavior one can: (1) Call the parent constr

Re: [PHP] Construction

2004-06-27 Thread Paul Bissex
On Sat, 26 Jun 2004 20:51:58 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: > > If you instantiate a child class, the parent class constructor is not > called, is there a reason for this? anyone know of plans to change > this at all, > the obvious workaround is to call the parents construc

Re: [PHP] Construction

2004-06-27 Thread David Goodlad
As far as I know, this is fairly common in most programming languages (but I just woke up so don't take my word on it!). It allows you a lot greater control over the construction of your class, since you can force the child class to override what the parent class's default member variable values a

[PHP] Construction

2004-06-26 Thread Jason Davidson
If you instantiate a child class, the parent class constructor is not called, is there a reason for this? anyone know of plans to change this at all, the obvious workaround is to call the parents constructor inside the childs constructor, but this seems kinda strange. Jason -- PHP General