> >> When would the constructor be called automatically? I've used Delphi
> >> and you use the inherit verb (or inherited - long time ago - can't
> >> remember exactly). In PHP parent::__construct (though I think
> >> parent::__METHOD__ would be cleaner as this removes ambiguity on the
> >> actual name for all inherited methods).
>
> > Well, let's look at C++, which I'm most familiar with.
>
> PHP is not C++

Ah, I was kind of waiting for that one... :) Yet, that says absolutely
nothing about why PHP works the way it does.

> and speaking of constructors and destrcutors PHP goes morethe Delphi way.

If constructors/destructors are not "the PHP way", then why even have them?

> We do not claim to follow any other language precisely, PHP is
> it's own language with its own feature set.

Naturally, but is it unreasonable to think that there's a reason for the way
things work in PHP...? And to ask _why_ PHP doesn't let you ensure that a
class has its constructor/destructor called? Why implement
constructors/destructors in such a way that they may - or may not - be
called? "Do you feel lucky?"

Regards,

Terje

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

Reply via email to