Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-29 Thread Tony Marston
"Rowan Collins" wrote in message news:f9001e2a-8f13-d4ba-f514-f18dc1e4f...@gmail.com... On 28/09/2017 20:07, Levi Morrison wrote: The brace style is concise, nicely delimits the expression, and seems the clearest for me to read because the symbols don't dominate. This is something that I

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-29 Thread Michał Brzuchalski
2017-09-28 21:07 GMT+02:00 Levi Morrison : > On Wed, Sep 27, 2017 at 1:56 PM, Sara Golemon wrote: > > > On Thu, Sep 21, 2017 at 5:13 PM, Stanislav Malyshev > > > wrote: > > > It'd be also nice then if we could have some syntax that allowed us to > > > refer to functions/methods as callables - mo

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-28 Thread Rowan Collins
On 28/09/2017 20:07, Levi Morrison wrote: The brace style is concise, nicely delimits the expression, and seems the clearest for me to read because the symbols don't dominate. This is something that I tried to push for in previous discussions - I've never liked the syntaxes where the expressi

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-28 Thread Levi Morrison
On Wed, Sep 27, 2017 at 1:56 PM, Sara Golemon wrote: > On Thu, Sep 21, 2017 at 5:13 PM, Stanislav Malyshev > wrote: > > It'd be also nice then if we could have some syntax that allowed us to > > refer to functions/methods as callables - mostly for the benefit of the > > code readers and IDEs. I.

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-27 Thread Sara Golemon
On Thu, Sep 21, 2017 at 5:13 PM, Stanislav Malyshev wrote: > It'd be also nice then if we could have some syntax that allowed us to > refer to functions/methods as callables - mostly for the benefit of the > code readers and IDEs. I.e. you can do "hello" |> "strtoupper" and it's > fine but it is n

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-21 Thread Levi Morrison
On Thu, Sep 21, 2017 at 3:13 PM, Stanislav Malyshev wrote: > Hi! > >> After discussion with Levi and others who suggested a simpler >> approach, I'd like to offer >> https://github.com/php/php-src/compare/master...sgolemon:pipe2 as an >> alternate possibility. > > I am still feeling it is a bit we

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-21 Thread Stanislav Malyshev
Hi! > After discussion with Levi and others who suggested a simpler > approach, I'd like to offer > https://github.com/php/php-src/compare/master...sgolemon:pipe2 as an > alternate possibility. I am still feeling it is a bit weird to do things that way, but other than that (which is just my perso

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-20 Thread Sara Golemon
On Wed, Sep 20, 2017 at 12:52 PM, Derick Rethans wrote: > On Wed, 20 Sep 2017, Nikita Popov wrote: >> > Future Scope: Short Lambdas `$x => $x + 1` and Partial Functions >> > `someFunc('fixed val1', ..., 'fixed val2')` would help make this >> > functionality more useful and are worth discussing as

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-20 Thread Christoph M. Becker
On 20.09.2017 at 18:52, Derick Rethans wrote: > On Wed, 20 Sep 2017, Nikita Popov wrote: > >> I think this feature makes very little sense if it's not introduced >> together with a way of making partial application much more ergonomic than >> it is now. > > What do you mean here by "partial appl

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-20 Thread Derick Rethans
On Wed, 20 Sep 2017, Nikita Popov wrote: > On Wed, Sep 20, 2017 at 6:32 AM, Sara Golemon wrote: > > > I was planning to update the RFC, but wiki.php.net is having issues > > atm and isn't coming back up with basic coaxing, so I'll just start > > discussion informally, and the RFC can be updates

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-20 Thread Ilija Tovilo
Agree. Even if we already had partial application the previously suggested syntax is still more readable IMO. Consider the following example: ``` $array   |> array_map(function ($element) { ... }, $$); ``` vs ``` $array   |> apply(flip('array_map'), function ($element) { ... }); ``` Not to m

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-20 Thread Nikita Popov
On Wed, Sep 20, 2017 at 6:32 AM, Sara Golemon wrote: > I was planning to update the RFC, but wiki.php.net is having issues > atm and isn't coming back up with basic coaxing, so I'll just start > discussion informally, and the RFC can be updates later. > > Background: I made an RFC some time ago t

Re: [PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-19 Thread Levi Morrison
On Tue, Sep 19, 2017 at 4:32 PM, Sara Golemon wrote: > I was planning to update the RFC, but wiki.php.net is having issues > atm and isn't coming back up with basic coaxing, so I'll just start > discussion informally, and the RFC can be updates later. > > Background: I made an RFC some time ago to

[PHP-DEV] [RFC] Pre-draft for PipeOp v2

2017-09-19 Thread Sara Golemon
I was planning to update the RFC, but wiki.php.net is having issues atm and isn't coming back up with basic coaxing, so I'll just start discussion informally, and the RFC can be updates later. Background: I made an RFC some time ago to implement HackLang's Pipe Operator https://docs.hhvm.com/hack/