Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35859 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30424 invoked by uid 1010); 29 Feb 2008 02:52:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30409 invoked from network); 29 Feb 2008 02:52:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2008 02:52:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=andi@zend.com; 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:7430] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/09-08995-B5377C74 for ; Thu, 28 Feb 2008 21:52:13 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 29 Feb 2008 04:52:21 +0200 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: Thu, 28 Feb 2008 18:52:16 -0800 Message-ID: <698DE66518E7CA45812BD18E807866CE0150671B@us-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] How to build a real Trait thing without exclusion and renaming Thread-Index: Ach6GDDzIIzyKD8ATTmGUi8k6k4DXwAZdSyg References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> <47C6253A.1070407@zend.com> <698DE66518E7CA45812BD18E807866CE01506473@us-ex1.zend.net> <749406991.20080228154210@marcus-boerger.de> To: "Marcus Boerger" Cc: "Stas Malyshev" , , "internals Mailing List" X-OriginalArrivalTime: 29 Feb 2008 02:52:21.0103 (UTC) FILETIME=[1A9D17F0:01C87A7E] Subject: RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming From: andi@zend.com ("Andi Gutmans") That's fine. I'm not attached to any name just the concept :) > -----Original Message----- > From: Marcus Boerger [mailto:helly@php.net] > Sent: Thursday, February 28, 2008 6:42 AM > To: Andi Gutmans > Cc: Stas Malyshev; php@stefan-marr.de; internals Mailing List > Subject: Re: [PHP-DEV] How to build a real Trait thing without > exclusion and renaming >=20 > Hello Andi, >=20 > I agree with Stas about 'local' and actually his reasoning is why I > simply suggested 'private'. That also has the advantage that people > already > know what it does. >=20 > marcus >=20 > Thursday, February 28, 2008, 5:14:17 AM, you wrote: >=20 > >> -----Original Message----- > >> From: Stanislav Malyshev [mailto:stas@zend.com] > >> Sent: Wednesday, February 27, 2008 7:07 PM > >> To: Andi Gutmans > >> Cc: php@stefan-marr.de; internals Mailing List > >> Subject: Re: [PHP-DEV] How to build a real Trait thing without > >> exclusion and renaming > >> > >> Hi! > >> > >> > trait MyDebug { > >> > local $counter =3D 1; > >> > >> IIRC we don't have keyword "local". Why not "private" or "static"? >=20 > > I wouldn't get too caught up on the naming at this point but rather > the > > functionality. >=20 > >> > class MyClock { > >> > use MyDebug *; > >> > use MyTicks { > >> > timeInTicks =3D inTicks; > >> > >> This looks like code which does assignment. How I am supposed to > >> understand from it that a new method for MyClock API is born? > >> > >> In any case, why you need timeInTicks at all? If you need it public, > >> why > >> not write an accessor? It'd be better OO anyway, since MyClock's > >> clients > >> can't know about MyTicks's details or even its existence. >=20 > > This is just an example of being able to alias a method from a trait. > > Assuming two traits would use the same name this would give you the > > ability to include it under a different name. > > The point is we can alias but we can not remove. >=20 > > Andi >=20 >=20 >=20 >=20 > Best regards, > Marcus