Re: RFC: Traits for PHP

From: Date: Tue, 19 Feb 2008 21:56:54 +0000
Subject: Re: RFC: Traits for PHP
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-35621@lists.php.net to get a copy of this message
On Feb 19, 2008 9:54 PM, Jochem Maas <jochem@iamjochem.com> wrote: > how about 'possesses' or 'exhibits' - both these words are closer to the > natural language usage of 'trait' with regard to a subject. > > John exhibits a **** trait > Jack possesses a **** trait I prefer `without over except, because except` is close to `exception` and because it has a different meaning in other languages (Eg. `catch`). > > > >> I'm not sure if the use-keyword is a good idea as namespaces are already > >> "used". If we use "use" for traits, maybe going back to > >> "import" for > >> namespaces would be the way to go. I agree that `use` is a bad choice, because of the nameclash with the namespaces syntax (pun intended). `possesses` is hideous, but `exhibit` isn't too bad. On Feb 19, 2008 10:02 PM, Stefan Marr <php@stefan-marr.de> wrote: > Here are some notation proposals: > (snip) > > I'm not sure about Aa and Ab because they do not read well in my opinion. > > What do you think? > [Ac] How about this: class FooFoo { exhibit Traitor { alias foo as bar; } } -- troels

« previous php.internals (#35621) next »