Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58781 invoked from network); 4 May 2012 23:38:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2012 23:38:32 -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:33115] helo=vps-1012701-4512.united-hoster.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/D6-18322-67864AF4 for ; Fri, 04 May 2012 19:38:30 -0400 Received: from d51a4d67f.access.telenet.be ([81.164.214.127] helo=[192.168.0.10]) by vps-1012701-4512.united-hoster.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SQS4u-0004eo-N9; Sat, 05 May 2012 01:38:25 +0200 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Sat, 5 May 2012 01:38:18 +0200 Cc: Scott MacVicar , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <2F98BD6D-618A-4AC2-A8F3-F43F4EE59CCA@stefan-marr.de> References: <9652E99E-97FF-4D62-99CE-EE3B5E27503E@macvicar.net> To: Hannes Magnusson X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Enforcing final in traits From: php@stefan-marr.de (Stefan Marr) On 04 May 2012, at 21:46, Hannes Magnusson wrote: > On Fri, May 4, 2012 at 8:30 PM, Scott MacVicar = wrote: >> This caused a few bugs for us / confusion. The final keyword is = accepted inside a trait but it the class also defines a method without = the final keyword this takes precedence. The methods in the class always take precedency.=20 However, the final keyword might just be something I overlooked. It sounds sensible that if the final is not explicitly removed during = composition to treat it as what final was meant for and check it against = the methods defined in the class body as well. Scott, could you elaborate a bit of the use case of final in a trait? > it also ignores visibility abstract and static.. abstract is not ignored. An abstract method in a trait expresses a requirement to the host class = (using class). In general, the ppp visibilities are seen as hints for the standard = usage of a trait, but can be changed during composition. Thanks 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