rfc:pipe-operator-v2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:pipe-operator-v2 [2021/07/05 15:58]
crell References are no longer allowed
rfc:pipe-operator-v2 [2021/07/20 15:34]
crell Close vote.
Line 3: Line 3:
   * Date: 2020-04-20   * Date: 2020-04-20
   * Author: Larry Garfield <larry@garfieldtech.com>   * Author: Larry Garfield <larry@garfieldtech.com>
-  * Status: Under Discussion+  * Status: Declined
   * First Published at: http://wiki.php.net/rfc/pipe-operator-v2   * First Published at: http://wiki.php.net/rfc/pipe-operator-v2
  
Line 140: Line 140:
 ===== Additional semantics ===== ===== Additional semantics =====
  
-Functions that accept their first parameter by reference are not allowed.  Functions that return by reference are not allowed.  As the whole point of pipes is to pass values along from one function to the nextreferences are of little value.+Functions that accept their first parameter by reference are allowed, as are functions that return by reference.  They will behave semantically the same as if they were passed a variable by reference or returned a variable by reference via a "normal" call.  In practicehowever, reference variables are of little use in pipes so this is more of a design artifact than design intent.
  
 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 270: Line 270:
 ==== Javascript ==== ==== Javascript ====
  
-A pipeline operator ''|>'' has been [[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Pipeline_operator|proposed for Javascript]].  As of this writing it is still in early stages and no implementations support it, but it may get accepted in the future.  The semantics are essentially the same as described here.+A pipeline operator ''|>'' has been [[https://github.com/tc39/proposal-pipeline-operator/wiki|proposed for Javascript]].  As of this writing it is still in early stages and no implementations support it, but it may get accepted in the future.  The semantics are essentially the same as described here.
  
 ==== OCaml ==== ==== OCaml ====
Line 299: Line 299:
  
 Adopt the Pipe Operator yes/no?  Requires a 2/3 majority. Adopt the Pipe Operator yes/no?  Requires a 2/3 majority.
 +
 +<doodle title="Pipe Operator" auth="crell" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/pipe-operator-v2.txt · Last modified: 2021/07/20 15:34 by crell