Re: How to build a real Trait thing without exclusion and renaming
| From: | Marcus Boerger | Date: | Thu, 28 Feb 2008 14:45:19 +0000 |
| Subject: | Re: How to build a real Trait thing without exclusion and renaming | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35853@lists.php.net to get a copy of this message | ||
Hello Stanislav,
as much as what you say is true, it forces you to type a lot which is
error prone. So when you want to make a function public then you need to do:
function whatever() {
A::whatever();
}
And actually you have to repeat the protocol and there the fun begins. Not
to begin even discussing the overhead of an additional userspace method
call that does not do anything. Aliasing is pretty helpful. But as Andi
said you might disagree.
marcus
Thursday, February 28, 2008, 8:21:22 AM, you wrote:
>> 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.
> That's what I am asking - why alias? You have perfectly good name for
> each one - A::whatever and B::whatever - which are unique. Why you need
> any more aliases?
> --
> Stanislav Malyshev, Zend Software Architect
> stas@zend.com http://www.zend.com/
> (408)253-8829 MSN: stas@zend.com
Best regards,
Marcus