Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55848 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62080 invoked from network); 17 Oct 2011 17:41:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2011 17:41:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.174 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.213.174 mail-yx0-f174.google.com Received: from [209.85.213.174] ([209.85.213.174:42005] helo=mail-yx0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/4B-27630-DD86C9E4 for ; Mon, 17 Oct 2011 13:41:49 -0400 Received: by yxp4 with SMTP id 4so4621625yxp.33 for ; Mon, 17 Oct 2011 10:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=XOclp0Q8tK4Ch9IgvW2aWp9qMIUCmz5WCVtOnDbbjlI=; b=Q74e1MaR4S8RdQLdYqFTqd2fics/df3dF6vzhtynUXSsM0h4NrORFfQ8tCCPBcOYBE NyiMZqogqXF4muCajokbpcZ6FzWbt5eLndyOu4PPCMlONX4DUDqS59yAAKYCaSNapBfq Nk7Nn6dWz63bIKqUmlZCkGw0gw7uYmIkqFo5I= MIME-Version: 1.0 Received: by 10.236.22.33 with SMTP id s21mr28607869yhs.70.1318873305122; Mon, 17 Oct 2011 10:41:45 -0700 (PDT) Received: by 10.147.125.13 with HTTP; Mon, 17 Oct 2011 10:41:45 -0700 (PDT) Date: Mon, 17 Oct 2011 19:41:45 +0200 Message-ID: To: Stefan Marr Cc: PHP Internals Content-Type: multipart/alternative; boundary=e89a8f647823db05d304af821e78 Subject: typehinting traits From: tyra3l@gmail.com (Ferenc Kovacs) --e89a8f647823db05d304af821e78 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Stefan, Multiple people asked me that how they can expect/check that a given object uses a trait or not. Of course one could write the concrete methods as a trait and always use a given interface for typehints, but I can't see why shouldn't instanceof and typehints in general work for traits. Is the any technical or maybe theoretical argument against this? --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --e89a8f647823db05d304af821e78--