Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35838 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16432 invoked by uid 1010); 28 Feb 2008 03:06:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 16408 invoked from network); 28 Feb 2008 03:06:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2008 03:06:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@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: stas@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:19863] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/F2-14752-F3526C74 for ; Wed, 27 Feb 2008 22:06:40 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 28 Feb 2008 05:06:49 +0200 Received: from [192.168.17.99] ([192.168.17.99]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 27 Feb 2008 19:06:46 -0800 Message-ID: <47C6253A.1070407@zend.com> Date: Wed, 27 Feb 2008 19:06:34 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Andi Gutmans CC: php@stefan-marr.de, internals Mailing List References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> In-Reply-To: <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Feb 2008 03:06:46.0074 (UTC) FILETIME=[F3C371A0:01C879B6] Subject: Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming From: stas@zend.com (Stanislav Malyshev) Hi! > trait MyDebug { > local $counter = 1; IIRC we don't have keyword "local". Why not "private" or "static"? > > class MyClock { > use MyDebug *; > use MyTicks { > timeInTicks = 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. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com