Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35622 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31089 invoked by uid 1010); 19 Feb 2008 21:59:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31074 invoked from network); 19 Feb 2008 21:59:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2008 21:59:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=stefan.marr.de@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stefan.marr.de@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.235 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: stefan.marr.de@gmail.com X-Host-Fingerprint: 64.233.184.235 wr-out-0506.google.com Linux 2.4/2.6 Received: from [64.233.184.235] ([64.233.184.235:47936] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/EA-55225-B315BB74 for ; Tue, 19 Feb 2008 16:59:24 -0500 Received: by wr-out-0506.google.com with SMTP id c38so2298492wra.17 for ; Tue, 19 Feb 2008 13:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=9arqMJc9w1czIYzMWpcr7D0MUP4mYewvSqtC32s6mL0=; b=XSd0TT7xqYfLRQ+M1TrT+gkOEAl9ZXNhv4VpFSTxdZLVWrAV2ojlXHztuog6WFOBVbZYBhh3jTI2n0/bmTvZ3hqSlwONIvjO3/hNaHPFx0jRKfq/GV/BA6OT1djmYBwE0vfl90Xi3e9lkK6C+mXzJtG/KI5Na/SGw/LUQMeY4QA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=orB6kNfYSzsktA8YrJF965X+F+Q0E3xc3R+1f9RNdUHgSVY8tdFiBL+5KmqnU6IHT3XHL425Ezx3HdklyckTXmRQwF7fFnF66XgwecCz/wBM8yU8ak4WU4NENI8c8FhbtDd4x6rEsoRdCgElOYdSxYJFN0GvAGVdEDVBiRGI/0Y= Received: by 10.142.115.10 with SMTP id n10mr5827935wfc.19.1203458360771; Tue, 19 Feb 2008 13:59:20 -0800 (PST) Received: by 10.142.141.2 with HTTP; Tue, 19 Feb 2008 13:59:20 -0800 (PST) Message-ID: <1e12984d0802191359p4f21c3acrdff4b86adfb4bf3@mail.gmail.com> Date: Tue, 19 Feb 2008 22:59:20 +0100 Sender: stefan.marr.de@gmail.com To: Evert|Rooftop Cc: "Stanislav Malyshev" , internals@lists.php.net In-Reply-To: <47BB4F49.1030904@rooftopsolutions.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001c01c87264$3c01b4e0$b4051ea0$@de> <173732199.20080219175837@marcus-boerger.de> <1203452909.24580.9.camel@localhost> <1e12984d0802191323o710c6b8ej3a54af7901cf35f1@mail.gmail.com> <47BB4AC9.9070701@zend.com> <1e12984d0802191346x7c145d7fp14c01ec4e5993779@mail.gmail.com> <47BB4F49.1030904@rooftopsolutions.nl> X-Google-Sender-Auth: cdfb86eea1ba05f2 Subject: Re: [PHP-DEV] RFC: Traits for PHP From: php@stefan-marr.de ("Stefan Marr") Hi Evert, > Aliasing doesn't make a lot of sense, as you can always : > > function newMethod() { > return $this->oldMethod(); > } Don't think so. You do use aliasing to handle conflicts and in the case of a conflict there is no oldMethod. trait A { public function foo() {echo 'foo';} } trait B { public function foo() {echo 'fooBar';} } class MyClass { use A; use B { !foo, fooBar => foo } } The result will be at runtime: class MyClass { public function foo() {echo 'foo';} public function foo() {echo 'fooBar';} } Here you can't do something like this: class MyClass { use A; use B; } since eventually there wont be any method in MyClass.