Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51502 invoked by uid 1010); 21 Feb 2008 14:47:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51487 invoked from network); 21 Feb 2008 14:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 14:47:56 -0000 X-Host-Fingerprint: 66.193.249.107 66-193-249-107.static.twtelecom.net Received: from [66.193.249.107] ([66.193.249.107:13672] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/4A-21621-91F8DB74 for ; Thu, 21 Feb 2008 09:47:54 -0500 Message-ID: <11.4A.21621.91F8DB74@pb1.pair.com> To: internals@lists.php.net References: <47BD207C.2080905@chiaraquartet.net> <03E69BFA-BDFB-4BAF-9109-DE840A35F1E8@pooteeweet.org> <1203599186.2101.1.camel@localhost> Date: Thu, 21 Feb 2008 08:49:29 -0600 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original X-Posted-By: 66.193.249.107 Subject: Re: [PHP-DEV] Trait aliasing syntax suggestions From: stack+phpinternals@landstander.com ("Michael Stack") 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 now you have a trait with 'has'. > 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; }}" would be declarative.