Re: RFC: Traits for PHP
| From: | Stefan Marr | Date: | Wed, 20 Feb 2008 20:43:28 +0000 |
| Subject: | Re: RFC: Traits for PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35663@lists.php.net to get a copy of this message | ||
> If we feel it gets necessary we probbaly
> might want to support a syntax like:
> 'trait_method' => false
> 'trait_method' => 'new_name'
> 'trait_method' => array('new_name', 'trait_method'
I'm not comfortable with this notation, since it strengthens the
impression that it is renaming.
In my eyes it looks like this:
"trait_method => false" means trait_method is moved to false, it is
deleted, but this leads to the wrong impression of this:
"trait_method => new_name" means trait_method is moved to new_name,
and I am absolutely against this notion.
Renaming implies in my opinion all references to this method might be
adjusted (what is not possible at all) and the original method is
"lost".
There are several problems with with "lost" method already discussed
on this list, like not fulfilled requirements (the delete method
thing).
The aliasing notion has the benefit that a method has to be explicitly
excluded to be removed. So the developer explicitly requests for a
change that he will handle on its own.
Kind Regards
Stefan