> I talked with Joe about this, and the answer is no.  Most of the complexity
> comes from the initial "this is a function call, oops no, it's a partial
> call so we switch to doing that instead", which ends up interacting with the
> engine in a lot of different places.  Once you've done that, supporting one
> placeholder or multiple, variadics or not, etc. is only a small incremental
> increase in complexity.

Hm, I was thinking more about the conceptual complexity, not the
implementation, but seems like the argument "cover all expected
use-cases" was used too. :) So no half-measures...

Thanks for your feedback.

Olle

>> > Overall, I really don't like the idea of special-casing pipes to change
>> > what
>> > symbol table gets looked up.
>>
>> Still wondering if this could be a per-file or per-library setting
>> somehow, to opt-in into pipe behaviour when so desired. Or rather, to
>> opt-in into this or that behaviour needed to do more idiomatic pipe.
>>
>> Here's one boilerplaty pipe:
>
> *snip*
>
> We're in the pipe thread here, not PFA. :-)  And really, you're solving the
> wrong problem.  Pipes are trivial.  They're only clunky because of PHP's
> lack of decent callable syntax.  PFA gives us that, but the engine makes the
> implementation more complex than it seems like at first glance.
>
> Trying to come up with complex workarounds to make pipes pretty without
> helping anything else is a fool's errand, especially when we have a working
> PFA RFC that's about to end voting.  (And right now is losing by a very slim
> margin, but could pass if a few people change their minds.)
>
> Aside from something like Nikita's ...-only function reference RFC, which
> only handles half the problem (it doesn't do anything to make multi-arg
> functions work with pipes at all), any other solution is going to end up
> reinventing PFA one way or another, or reinventing existing ugly user-space
> libraries. one way or another
>
> I've not yet decided if I'm going to bring pipes to a vote if PFA doesn't
> pass.  I'm tempted to, but it would require rewriting all the RFC text back
> to the uglier version without PFA, and yeah, it's not going to look as
> pretty.  And the main pushback a year ago when I first brought it up was
> "PFA first, please, so the callable syntax isn't ugly."  And... here we
> are.
>
> --Larry Garfield

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

Reply via email to