Re: Traits and Properties
| From: | Matthew Weier O'Phinney | Date: | Thu, 16 Dec 2010 17:49:07 +0000 |
| Subject: | Re: Traits and Properties | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51060@lists.php.net to get a copy of this message | ||
On 2010-12-16, Stefan Marr <php@stefan-marr.de> wrote:
> From my point of view the right thing to do with regard to properties
> is defined in the test cases below.
>
> The rational behind providing this semantics is based on the fact that
> PHP allows to define properties dynamically anyway, so there is no way
> around properties. However, there should be a way that a developer
> can notice that the code might not behave as expected in the composed
> class.
+1
The test cases you include are exactly how I would expect traits to work
with regards to properties.
--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc