Re: RFC: Return Types Update
| From: | Nikita Popov | Date: | Thu, 16 Oct 2014 09:55:24 +0000 |
| Subject: | Re: RFC: Return Types Update | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78109@lists.php.net to get a copy of this message | ||
On Thu, Oct 16, 2014 at 6:39 AM, Levi Morrison <levi_morrison@byu.edu>
wrote:
> Dear Internals,
>
> I finally have a working implementation for return types RFC[1] built
> on top of master. There are a few notes in the PR[2] about the
> implementation. I invite you all to review the PR and provide
> feedback.
>
> This means that I will soon move the return types RFC to voting phase.
> If you have not yet had time to review the RFC recently I invite you
> to do so now.
>
> The RFC has been slightly altered since the last discussion:
> - The RFC now targets PHP 7 (previously PHP 5.7).
> - There is a new section about disallowing return types on certain
> methods[4].
> - The design and accompanying section of reflection[3] has been
> rewritten entirely.
>
> Regardless of the result of the RFC, I want to thank the many people
> who have been helpful to me as I have learned php-src and iterated
> over this RFC.
>
+1
What I like about this RFC:
* It only covers return types and nothing else (no nullable types, no
scalar types, etc), thus avoiding unnecessary controversy.
* It uses postfix type notation, which is great for
grep, is compatible
with Hack and avoids weird syntax with anonymous functions (and also with
method generics, should they be introduced in the future).
* Sticking with covariant return types, even though it was tricky to
implement.
Nikita