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

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

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 di

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

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

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 n

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

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 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 na

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

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 d

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 understa

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 a

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 n

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,

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-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 a

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. > Eventual

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

2008-02-25 Thread 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 a large discomfiture on the excluding of methods