Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35699 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49982 invoked by uid 1010); 21 Feb 2008 18:55:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49967 invoked from network); 21 Feb 2008 18:55:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 18:55:45 -0000 Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:54869] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/FC-09272-E29CDB74 for ; Thu, 21 Feb 2008 13:55:45 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Feb 2008 20:55:47 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Feb 2008 10:55:44 -0800 Message-ID: <698DE66518E7CA45812BD18E807866CE014A8F72@us-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] RFC: Traits for PHP Thread-Index: Ach0uDhO2hI+FVJPQk2hXf+T/0RaVAAAo2KQ References: <001c01c87264$3c01b4e0$b4051ea0$@de> <698DE66518E7CA45812BD18E807866CE014A8D9D@us-ex1.zend.net> <698DE66518E7CA45812BD18E807866CE014A8F1E@us-ex1.zend.net> To: "Lukas Kahwe Smith" Cc: , , =?iso-8859-1?Q?Marcus_B=F6rger?= , =?iso-8859-1?Q?Johannes_Schl=FCter?= , "Sebastian Bergmann" , "Alexandre Bergel" , "Falko Menge" , "Sara Golemon" , X-OriginalArrivalTime: 21 Feb 2008 18:55:47.0713 (UTC) FILETIME=[5EBBC710:01C874BB] Subject: RE: [PHP-DEV] RFC: Traits for PHP From: andi@zend.com ("Andi Gutmans") > -----Original Message----- > From: Lukas Kahwe Smith [mailto:mls@pooteeweet.org] > Sent: Thursday, February 21, 2008 10:32 AM > To: Andi Gutmans > Cc: php@stefan-marr.de; internals@lists.php.net; Marcus B=F6rger; > Johannes Schl=FCter; Sebastian Bergmann; Alexandre Bergel; Falko = Menge; > Sara Golemon; derick@php.net > Subject: Re: [PHP-DEV] RFC: Traits for PHP >=20 >=20 > On 21.02.2008, at 19:09, Andi Gutmans wrote: >=20 > > I don't think so. I think the value here is not copy&paste but to be > > able to encapsulate some functionality which a class can be > > decorated with. Giving a basic storage mechanism to that would be > > very beneficial in a large amount of uses. Again, I am proposing > > private storage only which would be for internal use-only by the > > decorating methods. >=20 > if someone desperately needs that they could just write a method with > a static variable. Not really because if you want a container shared across the methods it = wouldn't be very feasible. I'm sure there are some hacks you can do but = I just think it'd be a pretty common use case. Stefan, you have done a lot of research in this area and I assume have = also looked at the most common=20 use-cases where this functionality is used in other languages. What is = your sense? > again i prefer to keep the feature as simple as possible without > crippeling it the point of not being useful. This suggestion is actually geared towards the opposite of crippling = (private property is actually an addition). I actually think this is = something which would be a very common use case for our users. Btw, the 2nd part where I recommend brainstorming about a slightly = stronger contract would actually also drive more towards simplicity.=20 In any case, I think we all agree this is a good thing to have in PHP. I = am not advocating the opposite but I would like to explore some of these = use-cases and options for a slightly stricter contact. Andi