On Mon, Jul 5, 2021 at 4:14 PM Sara Golemon <poll...@php.net> wrote:

> On Fri, Jul 2, 2021 at 5:51 AM Nikita Popov <nikita....@gmail.com> wrote:
>
>> As the partial function application RFC has not been accepted, I have
>> opened voting on https://wiki.php.net/rfc/first_class_callable_syntax.
>> The
>> vote closes on 2021-07-16.
>>
>> This RFC uses a syntax that is forward-compatible with partial function
>> application. Should it not be accepted, I'll explore alternative syntax
>> possibilities.
>>
>>
> Was replying to a comment on reddit which made me look closer at your
> implementation. It looks like this does NOT allow for use of function-like
> language constructs.
> e.g.   $e = echo(...);  $p = print(...);  $r = require(...);   // etc...
>
> 1/ Is this intentional?
>

Yes.


> 2/ Is this actually a good thing?
>

Yes. echo is not a function, so you can't acquire a callable to it.

The actual echo syntax is echo "Foo". PHP allows you to write echo("Foo")
in the same way it allows you to write echo((((("Foo"))))). Don't do it :)

Regards,
Nikita

Reply via email to