Re: Trait aliasing syntax suggestions

From: Date: Thu, 21 Feb 2008 12:55:39 +0000
Subject: Re: Trait aliasing syntax suggestions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-35688@lists.php.net to get a copy of this message
On 21.02.2008, at 07:55, Gregory Beaver wrote:
Simply re-using "trait" instead of "use" is a more self-documenting solution. I found it slightly confusing to see "use" when that is a namespace-specific token currently. This is also in keeping with the way functions are defined in interfaces vs. implementation, but in reverse (for traits, brackets are used for declaration, semi-colon used for instantiation).
I like "trait" instead of "use" or any of the other proposals as well
Obviously, using "unset" is more similar to current PHP ideas on how to remove something, and the "as" syntax is also very PHP-ish, these will be far more self-documenting than the proposed syntaxes I've read thus far.
Unset seems to send the wrong message again. "hide" might be better? As I said before "as" for aliasing is a good choice, or "alias" to make it even clearer. @Stefan: are you keeping track of all the different syntax proposals? regards, Lukas

« previous php.internals (#35688) next »