Re: [PHP-DEV] RFC: Traits for PHP

2008-02-21 Thread Joshua Thompson
e to just that trait, flattening would then require some kind of "alpha-rename" for even stateless traits in some cases. -- "Joshua Thompson" <[EMAIL PROTECTED]> <http://www.schmalls.com> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: RFC: Traits for PHP

2008-02-21 Thread Joshua Thompson
the original method name, which could be the same body, a method defined in a different trait, or the method overridden by the client class. -- "Joshua Thompson" <[EMAIL PROTECTED]> <http://www.schmalls.com> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Traits for PHP

2008-02-23 Thread Joshua Thompson
know of a way to make a method called {'Some::Name::Space::A::a'} inside the class in userspace (even though the interpreter can obviously handle it. -- "Joshua Thompson" <[EMAIL PROTECTED]> <http://www.schmalls.com> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Trait aliasing syntax suggestions

2008-02-23 Thread Joshua Thompson
t`, `add`, or even `+`. I also have an idea for aliasing that I don't think anyone has thought of yet: reusing the `clone` keyword like so: Cloning I think gives us the correct idea of what is actually happening: the entire body of method foo1 is copied to a new method called barFoo1. Als

[PHP-DEV] Re: How to build a real Trait thing without exclusion and renaming

2008-02-26 Thread Joshua Thompson
e 'A', which would not break the trait's internal method call, but it seems less obvious to me. -- "Joshua Thompson" <[EMAIL PROTECTED]> <http://www.schmalls.com> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming

2008-02-27 Thread Joshua Thompson
oute of stateful traits and forced the definition of which scope in the class. I also tried to keep the number of keywords to 1 (`trait`). I will keep working on it, and hopefully post it tomorrow for review. -- "Joshua Thompson" <[EMAIL PROTECTED]> <http://www.schmalls.co

[PHP-DEV] Non-breaking Traits

2008-02-28 Thread Joshua Thompson
ow the traits will be included into the class. Only simple code examples have been given, and questions will surely arise over what will happen if you include traits a certain way. In this case, more explanation and example code may be required. Bibliography ==== .. [1] Alexandre Bergel, St