Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35843 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99757 invoked by uid 1010); 28 Feb 2008 07:59:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99742 invoked from network); 28 Feb 2008 07:59:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2008 07:59:04 -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:21158] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/E3-06693-7C966C74 for ; Thu, 28 Feb 2008 02:59:04 -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 09:59:12 +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: Wed, 27 Feb 2008 23:59:07 -0800 Message-ID: <698DE66518E7CA45812BD18E807866CE01506492@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: Ach52o0+LsozqLhCTpmZDr1Su4/b6QABOIng References: <47C317F4.2080301@stefan-marr.de> <698DE66518E7CA45812BD18E807866CE01506447@us-ex1.zend.net> <47C6253A.1070407@zend.com> <698DE66518E7CA45812BD18E807866CE01506473@us-ex1.zend.net> <47C660F2.7060902@zend.com> To: "Stas Malyshev" Cc: , "internals Mailing List" X-OriginalArrivalTime: 28 Feb 2008 07:59:12.0338 (UTC) FILETIME=[CE26DB20:01C879DF] Subject: RE: [PHP-DEV] How to build a real Trait thing without exclusion and renaming From: andi@zend.com ("Andi Gutmans") > -----Original Message----- > From: Stanislav Malyshev [mailto:stas@zend.com] > Sent: Wednesday, February 27, 2008 11:21 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 >=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 > 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? The idea of Traits (whether you agree with it or not) is about a more flexible way of assembling classes and reusing pieces of functionality. The paradigm is different from inheritance/interfaces so the A::whatever/B::whatever is really not relevant in this context unless I have completely misunderstood you but I don't think I have. Andi