On Thu, May 12, 2016 at 11:52 AM, François Laupretre <franc...@php.net> wrote:
> If we restrict usage to function calls, we can quite easily get rid of the $$ 
> by
> associating to each function the position where the lhs must be inserted
> when used as a 'piped function call'.
>
So we'd have to audit all 4k+ functions in the PHP runtime (and
provide a mechanism for defining it on userspace functions)?

That feels like a LOT of work for an alternate approach to something
which takes much less work as proposed.  I'm hoping I misunderstand
what you're suggesting...

> Getting rid of the $$ would resolve most issues about parameter order in the
> existing library, which is probably the biggest PHP sadness.
>
I will admit that anything which alleviates the sadness from argument
ordering in the standard lib will be nice.  I'm just skeptical of the
work it'll take to get there.

> My question, before I write a detailed proposal for this, is : do you want
> to keep the possiblility to use *any* expression between pipe operators, or
> would it be acceptable to restrict this to function calls?
>
I'd like to keep the ability to use arbitrary expressions as it keeps
the language overall more consistent.   That said, nothing is set in
stone and the point of a discussion period is to discuss. Maybe with
your proposal written out it'll make more sense to me.

-Sara

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

Reply via email to