Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35648 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13300 invoked by uid 1010); 20 Feb 2008 10:39:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13285 invoked from network); 20 Feb 2008 10:39:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2008 10:39:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=M.Ford@leedsmet.ac.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=M.Ford@leedsmet.ac.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain leedsmet.ac.uk designates 160.9.128.16 as permitted sender) X-PHP-List-Original-Sender: M.Ford@leedsmet.ac.uk X-Host-Fingerprint: 160.9.128.16 mrelay-a.lmu.ac.uk Received: from [160.9.128.16] ([160.9.128.16:20855] helo=mrelay-a.lmu.ac.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/F1-30965-4730CB74 for ; Wed, 20 Feb 2008 05:39:49 -0500 Received: from localhost.lmu.ac.uk ([127.0.0.1] helo=localhost) by mrelay-a.lmu.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1JRmMc-0007aG-Q7 for internals@lists.php.net; Wed, 20 Feb 2008 10:39:46 +0000 Received: from mrelay-a.lmu.ac.uk ([127.0.0.1]) by localhost (mrelay-a [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25201-02 for ; Wed, 20 Feb 2008 10:39:35 +0000 (GMT) Received: from leedsmet-exch1.leedsmet.ac.uk ([160.9.35.117]) by mrelay-a.lmu.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1JRmMR-0007ZX-OA for internals@lists.php.net; Wed, 20 Feb 2008 10:39:35 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Feb 2008 10:39:34 -0000 Message-ID: <93ED589E60BA254F97435FE6C97F2C6702B9227C@leedsmet-exch1.leedsmet.ac.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-topic: [PHP-DEV] RFC: Traits for PHP thread-index: AchzOuuAHwjbGYbZTFq3FIoglF98OgAcIrOA To: X-Virus-Scanned: by McAfee at Leeds Metropolitan University Subject: RE: [PHP-DEV] RFC: Traits for PHP From: M.Ford@leedsmet.ac.uk ("Ford, Mike") On 19 February 2008 21:03, stefan.marr.de@gmail.com advised: > Hi Marcus, > Hi Troels, >=20 >> The biggest issue I see is finding a syntax everyone likes. > Well, lets try some variations. >=20 > [2a] ! is not readable --> except > use Trait { > except foo1, foo2; > bar =3D> foo1 > } >=20 > [2b] ! is not readable --> without > use Trait { > without foo1; > without foo2; > bar =3D> foo1; > } >=20 > [Aa] Aliasing is not obvious > use Trait { > bar is foo1; //aliasMethod is method > } >=20 > [Ab] Aliasing is not obvious > use Trait { > bar from foo1; //aliasMethod from method > } I may be completely off base with this suggestion, but how about something as simple as "not" and "as" (which also has the advantage of not requiring new keywords!): use Trait { not foo1 } use Trait { foo1 as bar } Although I can see how this might be considered a touch ugly: use Trait { not foo1; foo1 as bar } -- Mike Ford, Electronic Information Services Adviser, JG125, The Headingley Library, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 812 4730 Fax: +44 113 812 3211 To view the terms under which this email is distributed, please go to http:= //disclaimer.leedsmet.ac.uk/email.htm