Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50994 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14526 invoked from network); 10 Dec 2010 17:20:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2010 17:20:45 -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 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:50149] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/C9-59644-C61620D4 for ; Fri, 10 Dec 2010 12:20:45 -0500 Received: from soft83.vub.ac.be ([134.184.43.183]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PR6dU-0002yr-MX; Fri, 10 Dec 2010 18:20:03 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Fri, 10 Dec 2010 18:20:34 +0100 Cc: Nathan Nobbe , internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <4DBFCE63-A80F-4040-98CE-C04A6D42ACFC@stefan-marr.de> References: <9CD87200-33CB-40BE-A81C-36FD7471F59C@stefan-marr.de> <9A31F2F9-ED6B-4BE5-A6E2-EB4536E8667F@stefan-marr.de> To: Martin Wernstahl X-Mailer: Apple Mail (2.1082) Subject: Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks From: php@stefan-marr.de (Stefan Marr) Hello Martin: On 10 Dec 2010, at 18:15, Martin Wernstahl wrote: > First i have to say that I am not a PHP internals developer, but as a = user I > think it would maybe be better to just let the trait use the = implements > keyword, and "copy" that to the classes utilizing the trait? > Or does that seem illogical when the trait does not implement all of = the > methods specified by the interface? Implements sounds misleading to me. Read: trait Foo implements Bar. = Sounds like Foo is providing Bar and not expecting the interface to be = there. But require might be a good keyword to be reused. 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