Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34534 invoked from network); 27 Jun 2013 12:30:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jun 2013 12:30:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=bschussek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bschussek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: bschussek@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:65307] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/00-34034-3503CC15 for ; Thu, 27 Jun 2013 08:30:11 -0400 Received: by mail-wi0-f175.google.com with SMTP id m6so3041507wiv.14 for ; Thu, 27 Jun 2013 05:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=liPtu2LsyRb/HJC3F6/WKveQ1oj9j1VR33qBJnQXvEc=; b=Gj1XW763gxI0PlAqnzFs3w4lQ9K03skm2HbxHDC5MQpGuRxLqrXge2XbhXZ3uQcELX HM88+mCzF/fwn3apUuf1P7V+dYEcLl7oCny+VZtM1UZgkscMxRaZel5yYlxwIBzzw3xB dkrfzXME/SKEVuLzsxVDx+iwx2q36x0VnUDg+eiMLmmNky8gUv5j6CkTAeCElAqrAAbm jGwo5oCSf0o+HPfbzKpwlDfd94oCMhMdhv0bUZYWk+qon79oy3ZD13ozyKLz+mSyxcgP jM3iaedssmZR0bl05ohGzbTFjNhz4nNLk6uxDzpu32W5DYMx7ug1ajGhkbDkBW9/PFqd fd9g== X-Received: by 10.194.243.164 with SMTP id wz4mr6199299wjc.28.1372336208622; Thu, 27 Jun 2013 05:30:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.76.41 with HTTP; Thu, 27 Jun 2013 05:29:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Jun 2013 14:29:38 +0200 Message-ID: To: Anthony Ferrara Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e014940503a3e9004e021ecbe Subject: Re: [PHP-DEV] RFC: Protocol Type Hinting From: bschussek@gmail.com (Bernhard Schussek) --089e014940503a3e9004e021ecbe Content-Type: text/plain; charset=UTF-8 Hi Anthony, I really like the idea. But I'd prefer the following syntax: public function __construct(~HttpKernelInterfaceForClientIp $parent) { $this->parent = $parent; } Reasons: * A passed object does not have to explicitly implement the interface, but only implicitly ("practically", "more or less"). The tilde conveys that semantic very well. * As you mentioned, brackets are (IMO too) close to generics. Cheers, Bernhard -- Bernhard Schussek Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart 2013/6/25 Anthony Ferrara > Hey all, > > I want to throw out this draft RFC to get the concept floating around and > get feedback early. > > https://wiki.php.net/rfc/protocol_type_hinting > > There are still open questions, and a more complete (and cleaner) > implementation will be needed before officially proposing it, but I wanted > to get the concept out as soon as possible. > > What do you think? > > Thanks! > > Anthony > --089e014940503a3e9004e021ecbe--