rfc:any_all_on_iterable

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:any_all_on_iterable [2021/02/08 14:28] tandrerfc:any_all_on_iterable [2021/02/08 15:35] tandre
Line 1: Line 1:
 ====== PHP RFC: PHP\iterable\any() and all() on iterables ====== ====== PHP RFC: PHP\iterable\any() and all() on iterables ======
-  * Version: 0.4+  * Version: 0.5
   * Date: 2020-08-30   * Date: 2020-08-30
   * Author: Tyson Andre, tandre@php.net   * Author: Tyson Andre, tandre@php.net
Line 49: Line 49:
 ===== Proposal ===== ===== Proposal =====
  
-Add the functions ''PHP\iterable\any(iterable $input, ?callable $callback = null): bool'' and ''all(...)'' to PHP's standard function set.+Add the functions ''PHP\iterable\any(iterable $input, ?callable $callback = null): bool'' and ''all(...)'' to PHP's standard library'function set.
 (The namespace ''PHP\iterable'' was preferred in [[rfc:any_all_on_iterable_straw_poll_namespace#vote|a straw poll that was previously sent out]]) (The namespace ''PHP\iterable'' was preferred in [[rfc:any_all_on_iterable_straw_poll_namespace#vote|a straw poll that was previously sent out]])
 +
 +**The implementation is equivalent to the following polyfill:**
  
 <code php> <code php>
Line 235: Line 237:
 ===== Vote ===== ===== Vote =====
  
-Add ''PHP\iterable\any(iterable $input, ?callable $callback = null)'' and ''PHP\iterable\all(...)'' (yes/no, requiring a 2/3 majority)+Add ''PHP\iterable\any(iterable $input, ?callable $callback = null): bool'' and ''PHP\iterable\all(iterable $input, ?callable $callback = null): bool'' (yes/no, requiring a 2/3 majority)
  
 Voting started on 2021-02-08 and ends on 2021-02-22. Voting started on 2021-02-08 and ends on 2021-02-22.
Line 249: Line 251:
    * any()/all()    * any()/all()
    * any_value()/all_values()    * any_value()/all_values()
 +</doodle>
 +
 +==== Straw Poll ====
 +
 +<doodle title="Reasons for voting against this RFC" voteType="multi" auth="tandre" closed="false">
 +   * Too small in scope
 +   * Object to the choice of namespace
 +   * Prefer the global namespace
 +   * Confused about the implementation
 +   * Prefer userland solutions
 +   * Other
 +   * Voted for this RFC
 </doodle> </doodle>
  
Line 267: Line 281:
   * 0.3: Add more quotes   * 0.3: Add more quotes
   * 0.4: Change name to ''PHP\iterable\all'' and ''PHP\iterable\any'', add a secondary vote on ''any/all'' vs ''any_value()/all_values()''   * 0.4: Change name to ''PHP\iterable\all'' and ''PHP\iterable\any'', add a secondary vote on ''any/all'' vs ''any_value()/all_values()''
 +  * 0.5: Add straw poll
rfc/any_all_on_iterable.txt · Last modified: 2021/06/13 14:36 by tandre