Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61566 invoked from network); 13 Dec 2010 18:44:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2010 18:44:14 -0000 Authentication-Results: pb1.pair.com header.from=jbondc@openmv.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jbondc@openmv.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain openmv.com from 64.15.152.204 cause and error) X-PHP-List-Original-Sender: jbondc@openmv.com X-Host-Fingerprint: 64.15.152.204 mail.ca.gdesolutions.com Received: from [64.15.152.204] ([64.15.152.204:59118] helo=mail.ca.gdesolutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/60-59102-979660D4 for ; Mon, 13 Dec 2010 13:44:12 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 868DA5D18; Mon, 13 Dec 2010 13:44:05 -0500 (EST) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mb3zinBscSfs; Mon, 13 Dec 2010 13:44:05 -0500 (EST) Received: from djbondc (modemcable083.208-56-74.mc.videotron.ca [74.56.208.83]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 05C795D16; Mon, 13 Dec 2010 13:44:04 -0500 (EST) To: "'Nathan Nobbe'" Cc: "'Stefan Marr'" , References: <002101cb9a08$7b7ebb30$727c3190$@com> In-Reply-To: Date: Mon, 13 Dec 2010 13:44:04 -0500 Message-ID: <001801cb9af5$b7c57ff0$27507fd0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcuaRDeDUZYBVntNQtqvf5yqhajTvQABtG0A Content-Language: en-ca x-cr-hashedpuzzle: Bfrc DQQH EK1W FWML OVBG Qs9v Q9TC RBHc UqDl aMho aqPH cl77 eFmN fPX2 f5g6 hjY2;3;aQBuAHQAZQByAG4AYQBsAHMAQABsAGkAcwB0AHMALgBwAGgAcAAuAG4AZQB0ADsAcABoAHAAQABzAHQAZQBmAGEAbgAtAG0AYQByAHIALgBkAGUAOwBxAHUAaQBjAGsAcwBoAGkAZgB0AGkAbgBAAGcAbQBhAGkAbAAuAGMAbwBtAA==;Sosha1_v1;7;{5E60FE7F-000A-42FD-B27D-9D7DE223EF21};agBiAG8AbgBkAGMAQABvAHAAZQBuAG0AdgAuAGMAbwBtAA==;Mon, 13 Dec 2010 18:43:54 GMT;UgBFADoAIABbAFAASABQAC0ARABFAFYAXQAgAFQAcgBhAGkAdABzACAAZQB4AHAAZQBjAHQAaQBuAGcAIABpAG4AdABlAHIAZgBhAGMAZQBzACAAaQBtAHAAbABpAGMAaQB0AGwAeQAgAGwAZQBhAGQAcwAgAHQAbwAgAGUAeABwAGUAbgBzAGkAdgBlACAAcgB1AG4AdABpAG0AZQAgAGMAaABlAGMAawBzAA== x-cr-puzzleid: {5E60FE7F-000A-42FD-B27D-9D7DE223EF21} Subject: RE: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks From: jbondc@openmv.com ("Jonathan Bond-Caron") On Sun Dec 12 04:33 PM, Nathan Nobbe wrote: >=20 >=20 > So the 'with/within' tokens would apply to traits. >=20 > I feel 'expect', 'need', 'require' etc sound better, matter of opinion = > really, but it sounds like from an internals perspective it's=20 > preferred to reuse existing keywords if possible. >=20 Well my opinion is more of linguistics, given the definitions: =20 http://www.thefreedictionary.com/trait http://www.thefreedictionary.com/use http://www.thefreedictionary.com/with Using 'with/within' keywords for a trait seem more natural and intuitive = (at least as an English speaker).=20 I can understand re-using existing keywords and why 'use' was ok but = adding a 'require' for traits just feels awkward (saying you can = 'require' code or an interface for a trait). I know someone's bound to say "you'll get used to it", fair enough. I'll = add that Scala also uses 'with' for traits, so it's worth considering. >=20 > If you see the value in the abstract keyword in abstract classes or=20 > moreover interfaces in general, I'd consider the value of this feature = > equal. Of course not everyone uses abstract classes or interfaces :D > I agree with what you're saying, a little hesitant to say of equal value = since a lot of research has went into 'abstract' or 'interface' :)