Hello Andi, I agree with Stas about 'local' and actually his reasoning is why I simply suggested 'private'. That also has the advantage that people already know what it does.
marcus Thursday, February 28, 2008, 5:14:17 AM, you wrote: >> -----Original Message----- >> From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, February 27, 2008 7:07 PM >> To: Andi Gutmans >> Cc: [EMAIL PROTECTED]; internals Mailing List >> Subject: Re: [PHP-DEV] How to build a real Trait thing without >> exclusion and renaming >> >> Hi! >> >> > trait MyDebug { >> > local $counter = 1; >> >> IIRC we don't have keyword "local". Why not "private" or "static"? > I wouldn't get too caught up on the naming at this point but rather the > functionality. >> > class MyClock { >> > use MyDebug *; >> > use MyTicks { >> > timeInTicks = inTicks; >> >> This looks like code which does assignment. How I am supposed to >> understand from it that a new method for MyClock API is born? >> >> In any case, why you need timeInTicks at all? If you need it public, >> why >> not write an accessor? It'd be better OO anyway, since MyClock's >> clients >> can't know about MyTicks's details or even its existence. > This is just an example of being able to alias a method from a trait. > Assuming two traits would use the same name this would give you the > ability to include it under a different name. > The point is we can alias but we can not remove. > Andi Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php