Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-06 Thread Joe Watkins
Just to clarify, I said it didn't look like it could be a pure AST implementation, and that it looks like you may need one additional instruction. It does look that way to me - if only to throw a sensible error specifically for pipes but also because it makes the imposition of specific behaviour

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-06 Thread Larry Garfield
On Mon, Jul 5, 2021, at 11:05 AM, Larry Garfield wrote: > On Sat, Jul 3, 2021, at 9:12 PM, Larry Garfield wrote: > > On Mon, Jun 7, 2021, at 2:00 PM, Larry Garfield wrote: > > > Hi folks. Me again. > > > > > > A year ago, I posted an RFC for a pipe operator, |>, aka function > > > concatenation.

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-05 Thread Larry Garfield
On Sat, Jul 3, 2021, at 9:12 PM, Larry Garfield wrote: > On Mon, Jun 7, 2021, at 2:00 PM, Larry Garfield wrote: > > Hi folks. Me again. > > > > A year ago, I posted an RFC for a pipe operator, |>, aka function > > concatenation. At the time, the main thrust of the feedback was "cool, > > like,

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-04 Thread Larry Garfield
On Sun, Jul 4, 2021, at 2:18 AM, Olle Härstedt wrote: > 2021-07-04 4:12 GMT+02:00, Larry Garfield : > > On Mon, Jun 7, 2021, at 2:00 PM, Larry Garfield wrote: > >> Hi folks. Me again. > >> > >> A year ago, I posted an RFC for a pipe operator, |>, aka function > >> concatenation. At the time, the m

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-04 Thread Olle Härstedt
2021-07-04 4:12 GMT+02:00, Larry Garfield : > On Mon, Jun 7, 2021, at 2:00 PM, Larry Garfield wrote: >> Hi folks. Me again. >> >> A year ago, I posted an RFC for a pipe operator, |>, aka function >> concatenation. At the time, the main thrust of the feedback was "cool, >> like, but we need partial

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-07-03 Thread Larry Garfield
On Mon, Jun 7, 2021, at 2:00 PM, Larry Garfield wrote: > Hi folks. Me again. > > A year ago, I posted an RFC for a pipe operator, |>, aka function > concatenation. At the time, the main thrust of the feedback was "cool, > like, but we need partial function application first so that the syntax

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-29 Thread Olle Härstedt
2021-06-29 0:54 GMT+02:00, Larry Garfield : > On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > >> Mm. Assoc arrays are by now known to be not so good. I hope... > > There are millions of PHP sites build on anonymous arrays today. > >> OCaml is strictly evaluated, not lazy like Haskell. So t

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
> 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, supp

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > Mm. Assoc arrays are by now known to be not so good. I hope... There are millions of PHP sites build on anonymous arrays today. > OCaml is strictly evaluated, not lazy like Haskell. So the order might > matter, dunno, I don't use this oper

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-29 0:06 GMT+02:00, Rowan Tommins : > On 28/06/2021 21:28, Olle Härstedt wrote: >> Sorry for hijacking the thread, but are there no other alternatives, >> really? Just brainstorming: >> >> 1) Setting to silence the warning. > > > Just to reiterate: in PHP 8.0, an undefined constant is not a

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 23:36 GMT+02:00, Larry Garfield : > On Mon, Jun 28, 2021, at 3:42 PM, Olle Härstedt wrote: >> 2021-06-28 22:12 GMT+02:00, Larry Garfield : >> > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: >> >> On 28/06/2021 20:25, Olle Härstedt wrote: >> >> > Usage (ignoring the pesky undefin

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Rowan Tommins
On 28/06/2021 21:28, Olle Härstedt wrote: Sorry for hijacking the thread, but are there no other alternatives, really? Just brainstorming: 1) Setting to silence the warning. Just to reiterate: in PHP 8.0, an undefined constant is not a warning, it's an error. My apologies to code golfers: yo

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 3:42 PM, Olle Härstedt wrote: > 2021-06-28 22:12 GMT+02:00, Larry Garfield : > > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: > >> On 28/06/2021 20:25, Olle Härstedt wrote: > >> > Usage (ignoring the pesky undefined constant warnings ><): > >> > >> > >> Unfortunat

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 22:12 GMT+02:00, Larry Garfield : > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: >> On 28/06/2021 20:25, Olle Härstedt wrote: >> > Usage (ignoring the pesky undefined constant warnings ><): >> >> >> Unfortunately, you can't ignore those warnings; not least because >> they're fa

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 22:04 GMT+02:00, Rowan Tommins : > On 28/06/2021 20:25, Olle Härstedt wrote: >> Usage (ignoring the pesky undefined constant warnings ><): > > > Unfortunately, you can't ignore those warnings; not least because > they're fatal errors in PHP 8, as they frankly should have been in PHP 3. >

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: > On 28/06/2021 20:25, Olle Härstedt wrote: > > Usage (ignoring the pesky undefined constant warnings ><): > > > Unfortunately, you can't ignore those warnings; not least because > they're fatal errors in PHP 8, as they frankly should have b

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Rowan Tommins
On 28/06/2021 20:25, Olle Härstedt wrote: Usage (ignoring the pesky undefined constant warnings ><): Unfortunately, you can't ignore those warnings; not least because they're fatal errors in PHP 8, as they frankly should have been in PHP 3. You can use our current ugly callable syntax (stri

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-07 21:00 GMT+02:00, Larry Garfield : > Hi folks. Me again. > > A year ago, I posted an RFC for a pipe operator, |>, aka function > concatenation. At the time, the main thrust of the feedback was "cool, > like, but we need partial function application first so that the syntax for > callable

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-08 Thread Guilliam Xavier
On Tue, Jun 8, 2021 at 4:09 PM Larry Garfield wrote: > On Tue, Jun 8, 2021, at 5:41 AM, Guilliam Xavier wrote: > > > you forgot to update one > > `explode(?)` to `str_split(?)`, and also, the first `fn($v) => > > 'strtoupper'` should be just `'strtoupper'`. > > I deliberately made that example ex

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-08 Thread Larry Garfield
On Tue, Jun 8, 2021, at 5:41 AM, Guilliam Xavier wrote: > > Hm. You're right. It used to, but it's been a very long time since > > explode() allowed an empty split, apparently. I updated the example to use > > str_split, which is what I'd intended to do in this case. Thanks. > > > > Are you t

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-08 Thread Guilliam Xavier
Hi, On Tue, Jun 8, 2021 at 12:09 AM Larry Garfield wrote: > On Mon, Jun 7, 2021, at 4:00 PM, Eugene Leonovich wrote: > > On Mon, Jun 7, 2021 at 9:03 PM Larry Garfield > > wrote: > > > > > https://wiki.php.net/rfc/pipe-operator-v2 > > > > > FTR, there are several typos in the "Hello World" examp

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Mike Schinkel
> On Jun 7, 2021, at 9:39 PM, Larry Garfield wrote: > > On Mon, Jun 7, 2021, at 8:09 PM, Mike Schinkel wrote: >> >>> On Jun 7, 2021, at 3:00 PM, Larry Garfield wrote: >>> >>> Hi folks. Me again. >>> >>> A year ago, I posted an RFC for a pipe operator, |>, aka function >>> concatenation. At

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Larry Garfield
On Mon, Jun 7, 2021, at 8:09 PM, Mike Schinkel wrote: > > > On Jun 7, 2021, at 3:00 PM, Larry Garfield wrote: > > > > Hi folks. Me again. > > > > A year ago, I posted an RFC for a pipe operator, |>, aka function > > concatenation. At the time, the main thrust of the feedback was "cool, > > l

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Mike Schinkel
> On Jun 7, 2021, at 3:00 PM, Larry Garfield wrote: > > Hi folks. Me again. > > A year ago, I posted an RFC for a pipe operator, |>, aka function > concatenation. At the time, the main thrust of the feedback was "cool, like, > but we need partial function application first so that the synt

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Larry Garfield
On Mon, Jun 7, 2021, at 4:00 PM, Eugene Leonovich wrote: > On Mon, Jun 7, 2021 at 9:03 PM Larry Garfield > wrote: > > > Hi folks. Me again. > > > > A year ago, I posted an RFC for a pipe operator, |>, aka function > > concatenation. At the time, the main thrust of the feedback was "cool, > > lik

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Eugene Leonovich
On Mon, Jun 7, 2021 at 9:03 PM Larry Garfield wrote: > Hi folks. Me again. > > A year ago, I posted an RFC for a pipe operator, |>, aka function > concatenation. At the time, the main thrust of the feedback was "cool, > like, but we need partial function application first so that the syntax for

[PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-07 Thread Larry Garfield
Hi folks. Me again. A year ago, I posted an RFC for a pipe operator, |>, aka function concatenation. At the time, the main thrust of the feedback was "cool, like, but we need partial function application first so that the syntax for callables isn't so crappy." The PFA RFC is winding down now