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

2008-02-28 Thread Marcus Boerger
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

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

2008-02-28 Thread Marcus Boerger
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

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

2008-02-28 Thread Marcus Boerger
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

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

2008-02-28 Thread Andi Gutmans
That's fine. I'm not attached to any name just the concept :) -Original Message- From: Marcus Boerger [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 6:42 AM To: Andi Gutmans Cc: Stas Malyshev; [EMAIL PROTECTED]; internals Mailing List Subject: Re: [PHP-DEV] How to build

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

2008-02-27 Thread Richard Quadling
On 27/02/2008, Stefan Marr [EMAIL PROTECTED] wrote: Hi Richard, Richard Quadling schrieb: Traits as namespaces would solve the issue of conflict in the class Talker (you would have to explicitly say which trait the method came from. Yes, this would solve the conflicts, but is this

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

2008-02-27 Thread Stefan Marr
Hi Richard, Richard Quadling schrieb: Traits as namespaces would solve the issue of conflict in the class Talker (you would have to explicitly say which trait the method came from. Yes, this would solve the conflicts, but is this really handy? Every explicit reference to a trait/class name has

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

2008-02-27 Thread Andi Gutmans
-Original Message- From: Stefan Marr [mailto:[EMAIL PROTECTED] Sent: Monday, February 25, 2008 11:33 AM To: internals Mailing List; Marcus Boerger Subject: [PHP-DEV] How to build a real Trait thing without exclusion and renaming //here the new notion of combing traits and

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

2008-02-27 Thread Joshua Thompson
Andi Gutmans wrote: Hi Stefan, I think the discussion is going in the right direction but personally I had to think really hard to figure out what this code was going to do :) The following is a suggestion which takes into account some of the discussions we've had including points both Lukas

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

2008-02-27 Thread Stanislav Malyshev
Hi! trait MyDebug { local $counter = 1; IIRC we don't have keyword local. Why not private or static? class MyClock { use MyDebug *; use MyTicks { timeInTicks = inTicks; This looks like code which does assignment. How I am supposed to understand

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

2008-02-27 Thread Andi Gutmans
-Original Message- From: Joshua Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 6:54 PM To: internals@lists.php.net Subject: Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming I was working on a detailed RFC of something along these

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

2008-02-27 Thread Andi Gutmans
-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

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

2008-02-27 Thread Stanislav Malyshev
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

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

2008-02-27 Thread Stefan Marr
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

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

2008-02-27 Thread Andi Gutmans
-Original Message- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 11:21 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 This is just an

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

2008-02-25 Thread Richard Quadling
On 25/02/2008, Stefan Marr [EMAIL PROTECTED] wrote: Hi, there is a lot of discussion going on about how traits should actually work in PHP. Currently, one of the main challenges seams to be to agree on a suitable mechanism to avoid breaking traits and there behavior. Eventually, there

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

2008-02-25 Thread David Zülke
Am 25.02.2008 um 20:33 schrieb Stefan Marr: Hi, there is a lot of discussion going on about how traits should actually work in PHP. Currently, one of the main challenges seams to be to agree on a suitable mechanism to avoid breaking traits and there behavior. Eventually, there seams to be