Hi,

On May 16 16:52:08, Andrew Curioso wrote:
> Well, that wasn't where I was expecting that thread to go, but to wrap it up
> what do you think...
> Is it too late to put this on the 5.4 roadmap for consideration?
> 
> I'm assuming just the implicit ctor and dtor. Not all magic methods (not
> now, at least).
> 
> With your OK, Stas, I'd like to write up an RFC and put it on the Wiki.
> 
> - Andrew

The main problem with internal classes and ctors is that constructor
code can be placed at object init instead of in the actual ctor method.
It is actually safer to place it at object init, because then that code
is always executed and thus the internal object is not in a half
initialized state if the user overwrites the constructor and doesn't
call the parent.

I'd rather have ctors/dtors explicitely defined in SPL. If they are
documented to exist, they should be explicitely defined. We can define
such NOOP methods globally, so that it is easy for internal classes to add
them.

As far as implicitly ignore of the constructor, I believe we have enough
magic regarding ctors/dtors in the engine as it is.

Best,

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to