Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51021 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32408 invoked from network); 13 Dec 2010 16:16:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2010 16:16:49 -0000 Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 85.88.12.247 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 85.88.12.247 toolslave.net Received: from [85.88.12.247] ([85.88.12.247:46193] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/E0-23631-0F6460D4 for ; Mon, 13 Dec 2010 11:16:48 -0500 Received: from [134.184.43.20] by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PSB3z-00021X-Jn; Mon, 13 Dec 2010 17:15:50 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Mon, 13 Dec 2010 17:16:42 +0100 Cc: Pierre Joye , "internals@lists.php.net Development" Content-Transfer-Encoding: quoted-printable Message-ID: <8E30A7B6-D958-4EB3-B5EE-E082211A32B2@stefan-marr.de> References: <89C52156-CF92-4DDB-8BA4-4ABF6883512C@stefan-marr.de> To: RQuadling@googlemail.com X-Mailer: Apple Mail (2.1082) Subject: Re: [PHP-DEV] Traits and Properties From: php@stefan-marr.de (Stefan Marr) Hi Richard: On 13 Dec 2010, at 14:31, Richard Quadling wrote: > On 11 December 2010 23:31, Stefan Marr wrote: >> The current status of the property behavior is not yet documented = explicitly >=20 > On the assumption that traits WILL include properties (with > visibility) and aliasing can do all its magic, how would the situation > be handled where multiple traits define shared properties. >=20 > I've not got a use case, but say trait1 and trait2 both define the > same property. >=20 > Assuming name conflicts are handled via aliasing, then the property > needs to alert the aliasing code that this property is a non > conflicting property. Just to emphasize this another time: aliasing is no magic, it is NOT = renaming. (And it is only supported for methods.) The important implication here is, that aliasing is only useful from the = viewpoint of the composing class. Form the trait's perspective, aliasing does not have any effect. Aliasing can be used to make a function accessible that has a naming = conflict with another function. It enables composition of traits, but does not do anything with regard = which function names a trait-function calls. In PHP all function names = are late bound, there is no inner binding between functions in traits. Hope that clarifies what I perceived as a misconception. Best regards Stefan --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525