Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51009 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78626 invoked from network); 11 Dec 2010 18:36:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2010 18:36:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.35 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.35 mail-5.de-punkt.de Received: from [93.190.64.35] ([93.190.64.35:59471] helo=mail-5.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/F0-02666-994C30D4 for ; Sat, 11 Dec 2010 13:36:11 -0500 Received: (qmail 31531 invoked by uid 511); 11 Dec 2010 18:36:04 -0000 Received: by simscan 1.3.1 ppid: 31527, pid: 31529, t: 0.0548s scanners: attach: 1.4.0 Received: from unknown (HELO ?0.0.0.0?) (sb%sebastian-bergmann.de@217.114.76.105) by 0 with ESMTPA; 11 Dec 2010 18:36:04 -0000 Message-ID: <4D03C493.3010501@php.net> Date: Sat, 11 Dec 2010 19:36:03 +0100 Organization: PHP Development Team User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: internals@lists.php.net References: <89C52156-CF92-4DDB-8BA4-4ABF6883512C@stefan-marr.de> In-Reply-To: <89C52156-CF92-4DDB-8BA4-4ABF6883512C@stefan-marr.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Traits and Properties From: sebastian@php.net (Sebastian Bergmann) On 12/11/2010 05:47 PM, Stefan Marr wrote: > Another way would be to merge the properties in the composing class. +1 > The question here would be how to treat visibility modifiers One option would be to only allow private. That way only methods from the trait would have access and collisions could be prevented. > And, to discorage users to go this way, should there be a STRICT > notice? If you want to discourage attribute declaration in a trait, don't allow it at all. -- Sebastian Bergmann Co-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/