Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51444 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87605 invoked from network); 13 Feb 2011 10:24:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2011 10:24:39 -0000 Authentication-Results: pb1.pair.com header.from=ar@ez.no; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ar@ez.no; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ez.no from 74.125.82.170 cause and error) X-PHP-List-Original-Sender: ar@ez.no X-Host-Fingerprint: 74.125.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:50502] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/00-21539-561B75D4 for ; Sun, 13 Feb 2011 05:24:38 -0500 Received: by wyb39 with SMTP id 39so3776137wyb.29 for ; Sun, 13 Feb 2011 02:24:35 -0800 (PST) Received: by 10.227.143.198 with SMTP id w6mr1571698wbu.37.1297592179784; Sun, 13 Feb 2011 02:16:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.127.134 with HTTP; Sun, 13 Feb 2011 02:15:59 -0800 (PST) In-Reply-To: <4D541F8A.4050502@yahoo.com.au> References: <4D206CA4.6060004@yahoo.com.au> <005f01cbadc9$1172d080$34587180$@com> <4D284B8B.5040408@yahoo.com.au> <4D537DE1.2010309@yahoo.com.au> <36AB1B1C-1C92-475D-84C7-D0B0DB8FE462@roshambo.org> <4D541F8A.4050502@yahoo.com.au> Date: Sun, 13 Feb 2011 11:15:59 +0100 Message-ID: To: Ben Schmidt Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016363ba6bef07d4f049c273811 Subject: Re: [PHP-DEV] Extensions to traits From: ar@ez.no (=?UTF-8?B?QW5kcsOpIFLDuG1ja2U=?=) --0016363ba6bef07d4f049c273811 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Feb 10, 2011 at 6:25 PM, Ben Schmidt wrote: > On 11/02/11 3:37 AM, Philip Olson wrote: > >> You now have rights to the wiki rfc namespace. >> > > Thanks a lot, Philip. > > I have now made an RFC based on the most recent discussions: > > http://wiki.php.net/rfc/traitsmodifications > > I think this is a more solid proposal than my original one, and I hope > we can continue to discuss it and agree to the extent that it's worth > starting an implementation. > > Please read it and comment whenever you can find some time, guys! > As for your first example: trait T { public function foo() { echo "T"; }}class C { use T; public function foo() { echo "C"; }} I think it would sometimes be desirable to allow this, for instance when a trait has been updated in a framework to adapt to what has become common practice in classes that uses it in the wild. ( I assume you already get error if function signature is different like in inheritance? ) So to allow both cases, what about letting people use the final keyword on functions to signal functions that can not be re declared without alias. Or better, add a new keyword since final should mean final. My 2 Euro cents, Andr=C3=A9 --0016363ba6bef07d4f049c273811--