On Mon, Jan 30, 2017 at 4:05 PM, Rowan Collins <rowan.coll...@gmail.com> wrote:
> On 30/01/2017 17:55, Levi Morrison wrote:
>>
>> Bob Weinand and I are happy to announce that the [Arrow Functions][1]
>> RFC is moving into the public discussion phase. We have been
>> collaborating on this RFC for many months now and finally have a
>> proposal we are happy to discuss in the open.
>>
>>    [1]: https://wiki.php.net/rfc/arrow_functions
>
>
> Firstly, I like this proposal a lot more than the previous, so thank you for
> working on this based on previous discussion. In particular, I'm glad to see
> it focused on single expressions with implicit return, as I think that's
> where it has most value.
>
> A few comments:
>
>> ThisRFC does support type declarations for parameters and return types.
>
>
> An example of the syntax for this would be good, particularly how the return
> type fits the syntax (which may conflict with my suggestion below).

They go in the same places as regular functions. I'll update the RFC
later with examples, but for now here is an example that takes an
integer and returns it, which type declarations:

    fn (int $x): int => $x

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to