On 25 Mar 2010, at 16:00, Lukas Kahwe Smith wrote:
> On 25.03.2010, at 14:48, David Soria Parra wrote:
>> This approach is taken in scala and works pretty fine there for composing 
>> classes
>> during runtime and should be douable in PHP too. For sure aliasing is not
>> possible in this example.
>> 
>> But as said just a general idea that I might try to work on once traits are 
>> comittet.
>> 
>> Stefan what do you think about "stackable traits" ?
> 
> Woha .. that code really scares me.
I am not scared, it is just dynamic, and goes in the direction of 
prototype-based OO.

It could be implemented as hidden/shadow classes. Thus interpret 
'new Person() with Philsophical, Drink;' as a class definition itself, with 
some name-mangling it would be possible. And should not result in noticeable 
overhead. At least that is where Self and V8(JavaScript) are getting their 
speed from.

But, well, it is extension, think we should get the basics right first.

Best regards
Stefan




> regards,
> Lukas Kahwe Smith
> m...@pooteeweet.org
> 
> 
> 
> 
> --
> 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