Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51092 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87971 invoked from network); 19 Dec 2010 19:04:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2010 19:04:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 81.20.134.149 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 81.20.134.149 vps-1012701-4512.united-hoster.de Received: from [81.20.134.149] ([81.20.134.149:60051] helo=vps-1012701-4512.united-hoster.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/35-35939-6375E0D4 for ; Sun, 19 Dec 2010 14:04:23 -0500 Received: from cust194-138.dsl.as47377.net ([62.166.194.138] helo=[192.168.0.26]) by vps-1012701-4512.united-hoster.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1PUOYM-00056X-RF; Sun, 19 Dec 2010 20:04:19 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii In-Reply-To: <73.1D.35939.D413E0D4@pb1.pair.com> Date: Sun, 19 Dec 2010 20:04:11 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <89C52156-CF92-4DDB-8BA4-4ABF6883512C@stefan-marr.de> <201012132027.59678.larry@garfieldtech.com> <76C593EE-BCCA-4BBD-B625-B6AE9340B20C@stefan-marr.de> <73.1D.35939.D413E0D4@pb1.pair.com> To: Matthew Weier O'Phinney X-Mailer: Apple Mail (2.1082) Subject: Re: [PHP-DEV] Traits and Properties From: php@stefan-marr.de (Stefan Marr) Hi Matthew: On 19 Dec 2010, at 17:22, Matthew Weier O'Phinney wrote: > Exactly. I wouldn't default to public on conflicts, though -- just = with > the highest declared visibility (e.g., if one trait defines as private > and the other as protected, protected wins). I am currently actually implementing the most restricted proposal: all = differences in the property definition will lead to a fatal error. The reasoning behind this is, that the semantics of state is not = predictable and all changes in the class/traits hierarchies which are = incompatible should give the developer an immediate feedback, i.e., make = potentially incompatible code break. That is not the most 'dynamic' of all possible solutions but seems to = fit with the rest of PHP. What I have in mind is also not how the methods integrate into the = inheritance chain, thus, a property in the body of the class does not = override all property definitions in traits (this is the case for = methods). I think that will be useful for the very same reason. And well, I hope = an educative error message will steer the crowed in the right direction = to use accessors. 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