On Mon, Apr 18, 2016 at 12:17 PM, Stanislav Malyshev
<smalys...@gmail.com> wrote:
> Hi!
>
>>     Please review the following RFC:
>>     https://wiki.php.net/rfc/functional-interfaces
>>     An implementation is provided, and is testable on 3v4l.
>
> This looks like a rather narrow case already covered by anonymous
> classes. Am I missing something? What is the added value of it that
> can't be done now?
>
I thought Joe covered that question pretty thoroughly by his countable
examples.  The version using anonymous classes certainly *works*, but
it's significantly more boilerplate code and has a higher cognitive
overhead compared to the functional interface example which is concise
and to the point.

That said, I'm not sure what I'd use it for, but as syntactic sugar
goes it's quite sleek.

-Sara

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

Reply via email to