Hello,
What about has?
interface context {
/* ... */
}
trait contextA implements context {
/* ... */
}
class A {
has contextA;
has foobar;
}
In my opinion it is similar and descriptive like you having to implement an
interface with implements, extend a class with 'extends' and
@Stefan: are you keeping track of all the different syntax proposals?
Yes, I try to keep step with all those different proposals and sum them
up in the end of the day.
Kind Regards
Stefan
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.p
Hi,
Am Donnerstag, den 21.02.2008, 13:55 +0100 schrieb Lukas Kahwe Smith:
[...]
> I like "trait" instead of "use" or any of the other proposals as well
Do you like "class Foo class Bar" instead of "class Foo extends Bar"?
Normally PHP uses a descriptive naming scheme, while "class Foo { trait
XY;
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 v