Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-20 Thread Jordan LeDoux
On Tue, Jul 18, 2023 at 8:05 AM Robert Landers wrote: > On Tue, Jul 18, 2023 at 3:18 PM Olle Härstedt > wrote: > > > > 2023-07-18 14:48 GMT+02:00, someniatko : > > > I am glad this topic arose! I was also planning to write on this topic > to > > > the internals mailing list, but have abandoned

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-19 Thread Larry Garfield
On Wed, Jul 19, 2023, at 12:08 PM, Olle Härstedt wrote: > 2023-07-18 18:50 GMT+02:00, Larry Garfield : >> On Tue, Jul 18, 2023, at 4:47 PM, Olle Härstedt wrote: >> >>> Any comment on a pipe (or piped process) as a first-class value? When >>> you use |> the functions are immediately applied, which

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-19 Thread Olle Härstedt
2023-07-18 18:50 GMT+02:00, Larry Garfield : > On Tue, Jul 18, 2023, at 4:47 PM, Olle Härstedt wrote: > >> Any comment on a pipe (or piped process) as a first-class value? When >> you use |> the functions are immediately applied, which might not be >> what you want. You can lazify it by wrapping

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-18 21:44 GMT+02:00, Deleu : > https://wiki.php.net/rfc/short-functions >> https://wiki.php.net/rfc/auto-capture-closure >> https://wiki.php.net/rfc/partial_function_application >> https://wiki.php.net/rfc/pipe-operator-v2 > > > The only thing I can think of is if we gather a team of ~20

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Deleu
https://wiki.php.net/rfc/short-functions > https://wiki.php.net/rfc/auto-capture-closure > https://wiki.php.net/rfc/partial_function_application > https://wiki.php.net/rfc/pipe-operator-v2 The only thing I can think of is if we gather a team of ~20 ppl and come up with a plan on collectively

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-18 20:08 GMT+02:00, Larry Garfield : > On Tue, Jul 18, 2023, at 5:08 PM, Karoly Negyesi wrote: >> My favorite pipeline is Elixir, where "The pipe operator |> passes the >> result of an expression as the first parameter of another expression".. >> But >> it works there because unlike with

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Larry Garfield
On Tue, Jul 18, 2023, at 5:08 PM, Karoly Negyesi wrote: > My favorite pipeline is Elixir, where "The pipe operator |> passes the > result of an expression as the first parameter of another expression".. But > it works there because unlike with PHP, it's almost always the first > argument you want.

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Karoly Negyesi
My favorite pipeline is Elixir, where "The pipe operator |> passes the result of an expression as the first parameter of another expression".. But it works there because unlike with PHP, it's almost always the first argument you want. If it's not the first argument you needed to do some tricks

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Larry Garfield
On Tue, Jul 18, 2023, at 4:47 PM, Olle Härstedt wrote: > Any comment on a pipe (or piped process) as a first-class value? When > you use |> the functions are immediately applied, which might not be > what you want. You can lazify it by wrapping it in a lambda, but I > think that decreases the

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Larry Garfield
On Tue, Jul 18, 2023, at 4:41 PM, Karoly Negyesi wrote: > So. Let's get back to pipelines. > > I wrote this email because I was manipulating a robots meta tag string: > > $robots_array = explode(', ', $robots_string); > $robots_array = array_diff($robots_array, $remove); > $robots_string =

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-18 17:13 GMT+02:00, Larry Garfield : > On Tue, Jul 18, 2023, at 1:05 PM, Olle Härstedt wrote: >> 2023-07-18 14:48 GMT+02:00, someniatko : >>> I am glad this topic arose! I was also planning to write on this topic >>> to >>> the internals mailing list, but have abandoned this idea, because

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Karoly Negyesi
So. Let's get back to pipelines. I wrote this email because I was manipulating a robots meta tag string: $robots_array = explode(', ', $robots_string); $robots_array = array_diff($robots_array, $remove); $robots_string = implode(', ', $robots_array); Very pipeline-ish. You could write a

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Craig Francis
On 18 Jul 2023, at 16:13, Larry Garfield wrote: > PHP at the moment leans heavily on the "null is error and build tooling > around that" approach Yep, you should never use NULL in your code, the following is catastrophically bad... $search = ($_GET['q'] ?? NULL); $search =

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Larry Garfield
On Tue, Jul 18, 2023, at 1:05 PM, Olle Härstedt wrote: > 2023-07-18 14:48 GMT+02:00, someniatko : >> I am glad this topic arose! I was also planning to write on this topic to >> the internals mailing list, but have abandoned this idea, because I feel it >> might be inconvenient for the real active

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Robert Landers
On Tue, Jul 18, 2023 at 3:18 PM Olle Härstedt wrote: > > 2023-07-18 14:48 GMT+02:00, someniatko : > > I am glad this topic arose! I was also planning to write on this topic to > > the internals mailing list, but have abandoned this idea, because I feel it > > might be inconvenient for the real

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-18 14:48 GMT+02:00, someniatko : > I am glad this topic arose! I was also planning to write on this topic to > the internals mailing list, but have abandoned this idea, because I feel it > might be inconvenient for the real active PHP developers on the list to > receive too many emails

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-18 14:48 GMT+02:00, someniatko : > I am glad this topic arose! I was also planning to write on this topic to > the internals mailing list, but have abandoned this idea, because I feel it > might be inconvenient for the real active PHP developers on the list to > receive too many emails

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Olle Härstedt
2023-07-17 21:57 GMT+02:00, Larry Garfield : > On Mon, Jul 17, 2023, at 7:07 PM, Olle Härstedt wrote: >> 2023-07-17 18:58 GMT+02:00, Larry Garfield : >>> On Mon, Jul 17, 2023, at 2:57 PM, Olle Härstedt wrote: 2023-07-17 14:25 GMT+02:00, Karoly Negyesi : > Hi, > > I tried to read

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread someniatko
I am glad this topic arose! I was also planning to write on this topic to the internals mailing list, but have abandoned this idea, because I feel it might be inconvenient for the real active PHP developers on the list to receive too many emails from the people which don't actively participate in

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-17 Thread Larry Garfield
On Mon, Jul 17, 2023, at 7:07 PM, Olle Härstedt wrote: > 2023-07-17 18:58 GMT+02:00, Larry Garfield : >> On Mon, Jul 17, 2023, at 2:57 PM, Olle Härstedt wrote: >>> 2023-07-17 14:25 GMT+02:00, Karoly Negyesi : Hi, I tried to read on why the pipe RFC failed but by and large I also

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-17 Thread Olle Härstedt
2023-07-17 18:58 GMT+02:00, Larry Garfield : > On Mon, Jul 17, 2023, at 2:57 PM, Olle Härstedt wrote: >> 2023-07-17 14:25 GMT+02:00, Karoly Negyesi : >>> Hi, >>> >>> I tried to read on why the pipe RFC failed but by and large I also >>> failed. >>> >>> The discussion on

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-17 Thread Larry Garfield
On Mon, Jul 17, 2023, at 2:57 PM, Olle Härstedt wrote: > 2023-07-17 14:25 GMT+02:00, Karoly Negyesi : >> Hi, >> >> I tried to read on why the pipe RFC failed but by and large I also failed. >> >> The discussion on https://github.com/php/php-src/pull/7214 is very short. >> >>

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-17 Thread Olle Härstedt
2023-07-17 14:25 GMT+02:00, Karoly Negyesi : > Hi, > > I tried to read on why the pipe RFC failed but by and large I also failed. > > The discussion on https://github.com/php/php-src/pull/7214 is very short. > > https://externals.io/message/114770 is not so short but it seems not to > cover the