Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16705 invoked from network); 12 Dec 2010 00:24:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2010 00:24:34 -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:53738] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/30-13828-146140D4 for ; Sat, 11 Dec 2010 19:24:33 -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 1PRZj3-0005gX-K1; Sun, 12 Dec 2010 01:23:44 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4D03C493.3010501@php.net> Date: Sun, 12 Dec 2010 01:24:20 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <05528B59-EDBD-4E47-ABE4-5C78B9F54CC8@stefan-marr.de> References: <89C52156-CF92-4DDB-8BA4-4ABF6883512C@stefan-marr.de> <4D03C493.3010501@php.net> To: Sebastian Bergmann X-Mailer: Apple Mail (2.1082) Subject: Re: [PHP-DEV] Traits and Properties From: php@stefan-marr.de (Stefan Marr) Hi Sebastian: On 11 Dec 2010, at 19:36, Sebastian Bergmann wrote: >> And, to discorage users to go this way, should there be a STRICT >> notice? >=20 > If you want to discourage attribute declaration in a trait, don't > allow it at all. Not allowing it is not an option as far as I can tell. You can always use dynamically defined properties in a method. Changing that would change the whole character of PHP. Then we would have two types of methods, methods that are defined in the = class directly and can do what ever they want with properties, and = methods from traits which are restricted and can't access any state. I think, that would be to much penalty for all the valid use cases where = a naive property usage in a trait is still just fine. Best regards Stefan >=20 > --=20 > Sebastian Bergmann Co-Founder and Principal = Consultant > http://sebastian-bergmann.de/ = http://thePHP.cc/ >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 --=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