Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35842 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90998 invoked by uid 1010); 28 Feb 2008 07:30:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90983 invoked from network); 28 Feb 2008 07:30:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2008 07:30:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 82.96.83.42 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 82.96.83.42 serv6.servweb.de Linux 2.4/2.6 Received: from [82.96.83.42] ([82.96.83.42:43212] helo=serv6.servweb.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/52-06693-A2366C74 for ; Thu, 28 Feb 2008 02:30:51 -0500 Received: from [192.168.0.25] (toolslave.net [85.88.12.247]) by serv6.servweb.de (Postfix) with ESMTP id E5A5F590027; Thu, 28 Feb 2008 08:30:48 +0100 (CET) Message-ID: <47C66328.10606@stefan-marr.de> Date: Thu, 28 Feb 2008 08:30:48 +0100 Reply-To: php@stefan-marr.de User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Joshua Thompson Cc: internals@lists.php.net, Andi Gutmans References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> <36.91.14752.56226C74@pb1.pair.com> In-Reply-To: <36.91.14752.56226C74@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Redirected: By TestProxy Subject: Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming From: php@stefan-marr.de (Stefan Marr) Hi, Joshua Thompson schrieb: > Andi Gutmans wrote: >> The following code shows a few things: >> - local properties which can be used in self-contained functionality. >> The storage is guaranteed to stay internal and will not clash with the >> aggregating class. Yes, it is a nice to have. >> - methods are by default hidden to the aggregating class and bound to >> the trait (as Marcus pointed out the method name would be mangled with >> the trait's name) Hm, ok. It is the pessimistic counterpart to my proposal. In general, I'm much more optimistic and would prefer to teach developers to use proper naming to avoid conflicts. But if there is no other way to go, it is ok. > I was working on a detailed RFC of something along these lines. I didn't > include the local keyword, instead I went the route of stateful traits > and forced the definition of which scope in the class. I also tried to > keep the number of keywords to 1 (`trait`). > > I will keep working on it, and hopefully post it tomorrow for review. Looking forward to read it :) Kind Regards Stefan