2008/5/19 Christian Schneider <[EMAIL PROTECTED]>:
> Richard Quadling wrote:
>> (Not E_STRICT) If error_reporting does not include E_STRICT, then
>> unset()'ting properties defined in interfaces is allowed and operates
>> exactly as it does on normal variables and for properties defined in
>> classes. Whilst this may break the contract, this is what currently
>> happens and for the sake of BC (until a better solution is found), we
>> leave things alone. Personally, I think the potential new feature of
>> properties defined in interfaces should not be allowed to be unset.
>> But I'm looking at what I want with this and I hope that the following
>> text allows it.
>>
>> (E_STRICT) If error_reporting does include E_STRICT, then unset()'ting
>> properties defined in interfaces is not allowed and triggers an
>> E_STRICT error.
>
> We don't need this distinction: If you unset a property and access it
> afterwards you get an E_NOTICE so it can already be detected.
>
> And introducing different semantics depending on E_*-modes opens up
> another can of worms a la ini settings: Writing an application
> compatible with all different modes becomes a PITA.
>
> I agree with Stas here: Theoretical OO purism (I yet have to be shown
> code misbehaving with the current implementation) should not lead to
> artificial restrictions and/or code changes with BC breaks.
>
> - Chris
>

I'm no expert and I want to make a valid contribution here.

In trying to understand the proposal of allowing properties via
interfaces from your (Chris') point of view, what benefit do we get?

Allowing unset on properties in the class or in the interface, then
this seems like normal class properties.

We are talking about extending the behaviour of interfaces. Surely
this implies a greater amount of rigidity?


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

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

Reply via email to