Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50848 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65027 invoked from network); 5 Dec 2010 14:04:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2010 14:04:10 -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:42869] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/85-19822-9DB9BFC4 for ; Sun, 05 Dec 2010 09:04:09 -0500 Received: from cust194-138.dsl.as47377.net ([62.166.194.138] helo=[192.168.0.26]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PPFBx-0004bB-Rz for internals@lists.php.net; Sun, 05 Dec 2010 15:03:56 +0100 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Sun, 5 Dec 2010 15:03:55 +0100 Message-ID: To: "internals@lists.php.net Development" Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) Subject: Traits and Conflicts: Collisions as Warnings or Fatal? From: php@stefan-marr.de (Stefan Marr) Hi: While preparing some explanations on how to use traits, I stumbled over = an inconsistency in the current implementation. Currently collisions, if they are explicit in the code, lead to a = warning and are resolved by explicit exclusion of the two methods that = collide[1]. However, there are other ways to provoke a collision, for instance by = introducing a new alias during composition[2]. [1] = http://svn.php.net/viewvc/php/php-src/trunk/Zend/tests/traits/error_015.ph= pt?revision=3D305512&view=3Dmarkup [2] = http://svn.php.net/viewvc/php/php-src/trunk/Zend/tests/traits/language010.= phpt?revision=3D305512&view=3Dmarkup Collisions usually point to implementations that changed unexpectedly, = and the implicit resolution might be problematic since it could hide the = real cause for a bug. So, should that warning be changed to a fatal error, or should the other = fatals be warnings, too? 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