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 value of the pipe concept in itself. One
> strength is the ability to split the decision about what to glue
> together from the decision on how to execute it. You kinda get some
> light-weight metaprogramming ability that way.
>
> Well i guess such a pipe-concept is pretty far removed from the simple
> pipe operator. :) And also already possible with existing OOP
> concepts, callable classes, and now the (...) syntax.

That's the function concat operator I have been mentioning.  Concat can be 
implemented in terms of pipe, and pipe can be implemented in terms of concat, 
but I'd rather have both natively.

For more on my thoughts there, see: 
https://peakd.com/hive-168588/@crell/aoc2021-review

--Larry Garfield

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

Reply via email to