Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35853 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7689 invoked by uid 1010); 28 Feb 2008 14:45:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7674 invoked from network); 28 Feb 2008 14:45:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2008 14:45:20 -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:57353] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/D0-08995-FF8C6C74 for ; Thu, 28 Feb 2008 09:45:19 -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 A6E2B11F494; Thu, 28 Feb 2008 15:45:16 +0100 (CET) Date: Thu, 28 Feb 2008 15:45:19 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <777164528.20080228154519@marcus-boerger.de> To: Stanislav Malyshev CC: Andi Gutmans , php@stefan-marr.de, internals Mailing List In-Reply-To: <47C660F2.7060902@zend.com> References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> <47C6253A.1070407@zend.com> <698DE66518E7CA45812BD18E807866CE01506473@us-ex1.zend.net> <47C660F2.7060902@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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 Stanislav, as much as what you say is true, it forces you to type a lot which is error prone. So when you want to make a function public then you need to do: function whatever() { A::whatever(); } And actually you have to repeat the protocol and there the fun begins. Not to begin even discussing the overhead of an additional userspace method call that does not do anything. Aliasing is pretty helpful. But as Andi said you might disagree. marcus Thursday, February 28, 2008, 8:21:22 AM, you wrote: >> 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. > That's what I am asking - why alias? You have perfectly good name for > each one - A::whatever and B::whatever - which are unique. Why you need > any more aliases? > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com Best regards, Marcus