Hi Hernan:

On 15 Feb 2012, at 23:30, Hernan Wilkinson wrote:

> what is the difference with the current trait implementation in pharo? I 
> could not see the difference...

There are only cosmetic differences. (If I remember correctly what Pharo's 
traits entail.)

Most importantly, you cannot exclude arbitrary methods from a trait.
Thus, there is no exclude operator.
Instead, conflicts are resolved by explicitly stating which method wins a 
conflict with the insteadof keyword.

And, because PHP has a much more dynamic notion of object fields/slots, I added 
a couple of rules to make that manageable. 
https://wiki.php.net/rfc/horizontalreuse#handling_of_propertiesstate
The main idea is, break on obviously incompatible things, and leave the rest to 
the normal dynamic semantics. (which means, we do not have a solution for 
state).

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


Reply via email to