Re: horizontal reuse: traits vs. grafts

From: Date: Thu, 25 Mar 2010 20:30:31 +0000
Subject: Re: horizontal reuse: traits vs. grafts
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-47619@lists.php.net to get a copy of this message
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:

> Hi,
> 
> this was just brought up on IRC. my understanding is that traits have no concept of properties,
> but grafts do (all hidden internally). correct?
Right, the Traits proposal as it is at the moment, avoids the explicit discussion of state.
This is not a restriction per se, but could limit the composability of traits.

To ensure composibility, you would have to resort to abstract methods which are implemented by the
composing class.

Best regards
Stefan



-- 
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



Thread (21 messages)

« previous php.internals (#47619) next »