Hi Sebastian:
On 11 Dec 2010, at 19:36, Sebastian Bergmann wrote:
>> And, to discorage users to go this way, should there be a STRICT
>> notice?
>
> If you want to discourage attribute declaration in a trait, don't
> allow it at all.
Not allowing it is not an option as far as I can tell.
You can
Hi Pierre:
On 11 Dec 2010, at 23:13, Pierre Joye wrote:
> hi,
>
> Would it be possible to somehow document what you are discussing here?
> It is not too easy to keep track of all discussions about traits
> (along other things). Maybe in draft RFC or a simple page in the wiki.
> Doing so will hel
hi,
Would it be possible to somehow document what you are discussing here?
It is not too easy to keep track of all discussions about traits
(along other things). Maybe in draft RFC or a simple page in the wiki.
Doing so will help to have a quick view about the open questions or
recent changes/prop
On 12/11/2010 05:47 PM, Stefan Marr wrote:
Another way would be to merge the properties in the composing class.
+1
The question here would be how to treat visibility modifiers
One option would be to only allow private. That way only methods from
the trait would have access and collisions
On Sat, Dec 11, 2010 at 9:47 AM, Stefan Marr wrote:
> Hi:
>
> Traits do not provide any special provisioning for handling properties,
> especially, there is no language solution for handling colliding property
> names.
> The current solution/idiom for handling state safely in a trait is to use
>
Hi:
Traits do not provide any special provisioning for handling properties,
especially, there is no language solution for handling colliding property names.
The current solution/idiom for handling state safely in a trait is to use
either abstract set/get methods or an abstract get that returns a
Hi:
I added the proposal to the RFC.
See
http://wiki.php.net/rfc/horizontalreuse#requiring_composing_class_to_implement_interface
= Requiring Composing Class to Implement Interface =
Traits are able to express required methods by using abstract method
declarations.
An abstract method c