Hello Stefan, Thursday, February 28, 2008, 8:30:48 AM, you wrote:
> Hi, > Joshua Thompson schrieb: >> Andi Gutmans wrote: >>> The following code shows a few things: >>> - local properties which can be used in self-contained functionality. >>> The storage is guaranteed to stay internal and will not clash with the >>> aggregating class. > Yes, it is a nice to have. >>> - methods are by default hidden to the aggregating class and bound to >>> the trait (as Marcus pointed out the method name would be mangled with >>> the trait's name) > Hm, ok. It is the pessimistic counterpart to my proposal. In general, > I'm much more optimistic and would prefer to teach developers to use > proper naming to avoid conflicts. But if there is no other way to go, it > is ok. I did a lot of tutorials and sessions on object oriented PHP and I have learned one thing we have to make it easy and limit the ability to use stuff wrong. In other words we have to be pessimistic. Otherwise we end up in a mess. >> I was working on a detailed RFC of something along these lines. I didn't >> include the local keyword, instead I went the route 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. > Looking forward to read it :) Same here Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php