Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35852 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6242 invoked by uid 1010); 28 Feb 2008 14:42:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6227 invoked from network); 28 Feb 2008 14:42:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2008 14:42:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:59758] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/90-08995-148C6C74 for ; Thu, 28 Feb 2008 09:42:10 -0500 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 26EAC11F478; Thu, 28 Feb 2008 15:42:07 +0100 (CET) Date: Thu, 28 Feb 2008 15:42:10 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <749406991.20080228154210@marcus-boerger.de> To: "Andi Gutmans" CC: "Stas Malyshev" , php@stefan-marr.de, "internals Mailing List" In-Reply-To: <698DE66518E7CA45812BD18E807866CE01506473@us-ex1.zend.net> References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> <47C6253A.1070407@zend.com> <698DE66518E7CA45812BD18E807866CE01506473@us-ex1.zend.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] How to build a real Trait thing without exclusion and renaming From: helly@php.net (Marcus Boerger) Hello Andi, 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. marcus Thursday, February 28, 2008, 5:14:17 AM, you wrote: >> -----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 = 1; >> >> IIRC we don't have keyword "local". Why not "private" or "static"? > I wouldn't get too caught up on the naming at this point but rather the > functionality. >> > 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. > 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. > Andi Best regards, Marcus