rfc:pipe-operator-v2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:pipe-operator-v2 [2021/07/04 01:53] – crell | rfc:pipe-operator-v2 [2021/07/20 15:34] (current) – Close vote. crell | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2020-04-20 | * Date: 2020-04-20 | ||
* Author: Larry Garfield < | * Author: Larry Garfield < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 140: | Line 140: | ||
===== Additional semantics ===== | ===== Additional semantics ===== | ||
- | Functions that accept their first parameter by reference are supported, and will behave | + | Functions that accept their first parameter by reference are allowed, as are functions that return by reference. |
When evaluating a pipe, the left-hand side is fully evaluated first, then the right-hand side, then the right-hand side is invoked using the left-hand side. That is, evaluation is strictly left-to-right. | When evaluating a pipe, the left-hand side is fully evaluated first, then the right-hand side, then the right-hand side is invoked using the left-hand side. That is, evaluation is strictly left-to-right. | ||
Line 196: | Line 196: | ||
function getLineCount(string $directory, string $ext): int { | function getLineCount(string $directory, string $ext): int { | ||
return new RecursiveDirectoryIterator(' | return new RecursiveDirectoryIterator(' | ||
- | |> new RecursiveIteratorIterator(?) | + | |> fn($x) => new RecursiveIteratorIterator($x) |
|> itfilter(fn ($file) => $file-> | |> itfilter(fn ($file) => $file-> | ||
|> itmap(nonEmptyLines(...)) | |> itmap(nonEmptyLines(...)) | ||
Line 221: | Line 221: | ||
* Laravel includes a [[https:// | * Laravel includes a [[https:// | ||
* The [[https:// | * The [[https:// | ||
+ | * [[https:// | ||
* Various blogs speak of "the Pipeline Pattern" | * Various blogs speak of "the Pipeline Pattern" | ||
Line 269: | Line 270: | ||
==== Javascript ==== | ==== Javascript ==== | ||
- | A pipeline operator '' | + | A pipeline operator '' |
==== OCaml ==== | ==== OCaml ==== | ||
Line 298: | Line 299: | ||
Adopt the Pipe Operator yes/ | Adopt the Pipe Operator yes/ | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/pipe-operator-v2.1625363590.txt.gz · Last modified: 2021/07/04 01:53 by crell