Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35701 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56744 invoked by uid 1010); 21 Feb 2008 19:18:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56729 invoked from network); 21 Feb 2008 19:18:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 19:18:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:4016] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/3E-09272-77ECDB74 for ; Thu, 21 Feb 2008 14:18:17 -0500 Received: (qmail 73567 invoked by uid 98); 21 Feb 2008 19:20:40 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.01 (clamdscan: 0.88.7/5911. Clear:RC:1(127.0.0.1):. Processed in 0.089821 secs); 21 Feb 2008 19:20:40 -0000 Received: from localhost (HELO www.l-i-e.com) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 19:20:40 -0000 Received: from 98.193.37.55 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Thu, 21 Feb 2008 13:20:40 -0600 (CST) Message-ID: <33475.98.193.37.55.1203621640.squirrel@www.l-i-e.com> In-Reply-To: References: <001c01c87264$3c01b4e0$b4051ea0$@de> <58510.98.193.37.55.1203374232.squirrel@www.l-i-e.com> Date: Thu, 21 Feb 2008 13:20:40 -0600 (CST) To: "David Coallier" Cc: php@stefan-marr.de, internals@lists.php.net, Marcus =?iso-8859-1?Q?B=C3=B6rger?= , Johannes =?iso-8859-1?Q?Schl=C3=BCter?= , "Sebastian Bergmann" , "Alexandre Bergel" , "Falko Menge" , "Sara Golemon" , derick@php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] RFC: Traits for PHP From: ceo@l-i-e.com ("Richard Lynch") On Mon, February 18, 2008 5:08 pm, David Coallier wrote: > On Feb 18, 2008 5:37 PM, Richard Lynch wrote: >> On Mon, February 18, 2008 1:27 pm, php@stefan-marr.de wrote: >> > > > trait ezcReflectionReturnInfo { >> > function getReturnType() { /*1*/ } >> > function getReturnDescription() { /*2*/ } >> > } >> > >> > class ezcReflectionMethod extends ReflectionMethod { >> > use ezcReflectionReturnInfo; >> >> So it's just like an include for a re-used body of 'class' code. >> >> Hmmmm. >> >> Why not just allow 'include' here instead? > > Oh come on.. > >> >> :-) >> >> Forgive me if I'm missing something subtle/complex here, but I >> wonder >> if a Trait is really the "right answer"... >> >> Yes, the ability to add/exclude specific functions from two Traits >> is >> "gone" with a simple 'include'... But so is the complexity of yet >> another language construct... > > Please if you do not understand a concept, do not bash it or degrade > it. > > Read the proposal, read about traits, read the thesis, read the patch, > then if you still don't understand, give up, and if you do understand, > you can complain. I am not complaining. I think it's a FINE proposal. I'm suggesting an alternative solution which is simpler and easier to implement, with less confusion for new users. In fact, new users are often confused because the CAN'T do an include in the middle of a class -- A rule which, to some, seems arbitrary and illogical. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?