Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74109 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61580 invoked from network); 9 May 2014 21:27:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2014 21:27:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.172 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.172 mail-ob0-f172.google.com Received: from [209.85.214.172] ([209.85.214.172:46361] helo=mail-ob0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/91-46741-4584D635 for ; Fri, 09 May 2014 17:27:49 -0400 Received: by mail-ob0-f172.google.com with SMTP id wp18so5488071obc.17 for ; Fri, 09 May 2014 14:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xSuir69p9lCprRE+mE4k1eAOwH80tDPqFbafgr5EKBI=; b=afY3eLzZen+6Qe63XRI8jXfhZnL0kEDMC01IsicyN1i7kKubDmvD9qn9PVAYL5uwJK Qs2pwXX9eI3xIsKVeeC+9/Sr2QXs9jr3/uIMW+BdyX+yL3KTqsNODKvUgqmVYPP2vuMP XaJsepNqqo9FT6SQ+Vy/uJF3S8LIPd07dWhPw5RL8l7G2fmzBfUtUGb1iFQlkqdTaA1m Yyx5V+/XIS8lsO5OH6gOylb2A0P9N0tXKzly/36aSfHfx7Ea2eUWbvqeoFU1SO2VZsfu ttyZoKCN3LkW0LvPSeNVVl36w68OWIm8PNg4KkeaeAJPTZLtpPiSM+vrUQE9HgmOAgri GqAQ== MIME-Version: 1.0 X-Received: by 10.182.66.202 with SMTP id h10mr17760966obt.38.1399670865771; Fri, 09 May 2014 14:27:45 -0700 (PDT) Received: by 10.76.77.100 with HTTP; Fri, 9 May 2014 14:27:45 -0700 (PDT) In-Reply-To: <90B71511-4FB4-4916-9AC0-E3DD0D328C37@fb.com> References: <90B71511-4FB4-4916-9AC0-E3DD0D328C37@fb.com> Date: Fri, 9 May 2014 15:27:45 -0600 Message-ID: To: Josh Watzman Cc: internals Content-Type: multipart/alternative; boundary=089e0160c34ec1f69b04f8fe44ed Subject: Re: [PHP-DEV] [RFC] Return Type Declarations pre-vote follow-up From: morrison.levi@gmail.com (Levi Morrison) --089e0160c34ec1f69b04f8fe44ed Content-Type: text/plain; charset=UTF-8 Minor issues first: First minor issue: you have a return type "self". This is an LSB type, > effectively the type of "new static". Levi, I remember discussing this with > you in IRC, but not the result of that discussion. What is the reason for > "self"? The Hack type system calls it "this", which I admit is a little > confusing since it is the type of more things than just the literal > variable "$this" ("new static" for example is also of type "this"). But the > type "static" is much more consistent with the existing LSB language, i.e., > "new static". So is there any reason to call it "self" over "static" or > "this"? > The type 'self' is not late bound, unlike 'static' and exists in the language elsewhere; I am not introducing a new keyword 'self' in this RFC. > Second minor issue: your reflection implementation is slightly different > from HHVM's. I'm told we call the method "getReturnTypeText", which returns > the hint text, or false if none exists. I don't know how strongly we feel > about this, but at the very least, I wanted to make sure you were aware > that you were definitely diverging from the existing implementation here, > and that it was done intentionally. (Also, I don't think you have any test > coverage of this feature?) All we did was copy the existing structure in Parameter type hints; this was done for consistency. Is there any particular reason Hack/HHVM chose to do something entirely different for return types in regards to reflection? I don't particularly like the way type information is handled in Reflection anyway. --089e0160c34ec1f69b04f8fe44ed--