Hi Sebastian:

On 11 Dec 2010, at 19:36, Sebastian Bergmann wrote:
>> And, to discorage users to go this way, should there be a STRICT
>> notice?
> 
> If you want to discourage attribute declaration in a trait, don't
> allow it at all.
Not allowing it is not an option as far as I can tell.

You can always use dynamically defined properties in a method.
Changing that would change the whole character of PHP.
Then we would have two types of methods, methods that are defined in the class 
directly and can do what ever they want with properties, and methods from 
traits which are restricted and can't access any state.

I think, that would be to much penalty for all the valid use cases where a 
naive property usage in a trait is still just fine.

Best regards
Stefan


> 
> -- 
> Sebastian Bergmann                    Co-Founder and Principal Consultant
> http://sebastian-bergmann.de/                           http://thePHP.cc/
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


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

Reply via email to