Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50996 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23354 invoked from network); 10 Dec 2010 18:03:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2010 18:03:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=m4rw3r@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=m4rw3r@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: m4rw3r@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:48130] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/4B-59644-95B620D4 for ; Fri, 10 Dec 2010 13:03:05 -0500 Received: by yxi11 with SMTP id 11so2421710yxi.29 for ; Fri, 10 Dec 2010 10:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=uvFDh4F1n7aBJGBYTX6fBZQyNQDrYlAndrFfNBETPNI=; b=uSY+2wblvJDErxFgXvBtkl7X2gMxTv9sTsuqeIX8WErzTPAgbgsKM2HsFq3cf+V3De OH2P62SyyyFC0DmVud8IR1O7E+Gv6qxVxiI33MCHlHN3/grOzN1UwDi+ZUf6nQB2HNEX 38RkiqKszNtBKYNW0wVyBOEyL8ucpR9vrv35A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KmcuBWe5MjV5+n6auY+zimxKADvvyWfJOBkvJCeX1PK8T4xQnUr5Xqpo7dv9s1Da99 0LnJ8VEvxz/9JTwVPqkUnyJO2kGdqGIJEJrHpy2GsvTjG/4P9hfCq8b5Q1Hx/zI102QH c6ZabYb3R9TJKB8l3rm1xiLzeov2I885bHpok= MIME-Version: 1.0 Received: by 10.100.17.13 with SMTP id 13mr671585anq.190.1292004168110; Fri, 10 Dec 2010 10:02:48 -0800 (PST) Received: by 10.100.212.14 with HTTP; Fri, 10 Dec 2010 10:02:48 -0800 (PST) In-Reply-To: References: <9CD87200-33CB-40BE-A81C-36FD7471F59C@stefan-marr.de> <9A31F2F9-ED6B-4BE5-A6E2-EB4536E8667F@stefan-marr.de> Date: Fri, 10 Dec 2010 19:02:48 +0100 Message-ID: To: Nathan Nobbe Cc: Stefan Marr , internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e64692a27d13a104971229fe Subject: Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks From: m4rw3r@gmail.com (Martin Wernstahl) --0016e64692a27d13a104971229fe Content-Type: text/plain; charset=ISO-8859-1 Oh, sorry, should have read the RFC thoroughly before sending an email. But yeah, require might be a good choice, provided it doesn't collide with the specific require logic in the scanner/parser (I don't have much knowledge on that subject, but I've peeked a few times on it as it is interesting). Best Regards Martin Wernstahl On Fri, Dec 10, 2010 at 18:29, Nathan Nobbe wrote: > On Fri, Dec 10, 2010 at 10:15 AM, 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? >> > > This is actually in the RFC as a rejected proposal > > http://wiki.php.net/rfc/traits#rejected_features > > But what I'm talking about is something different. We're not trying to say > 'these are the methods implemented in the trait', rather, 'this trait > expects a class it is used with to be of a certain type or implement a > certain interface' for the trait to do its job. > > -nathan > --0016e64692a27d13a104971229fe--