rfc:cachediterable_straw_poll

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:cachediterable_straw_poll [2021/06/02 02:16] tandrerfc:cachediterable_straw_poll [2021/06/05 16:34] tandre
Line 70: Line 70:
 \\ \\
  
-Functionality of interest in the successor to the [[rfc:any_all_on_iterable|any() and all() on iterables]] RFC: [[https://github.com/php/php-src/pull/6053|any()/all()/none()/find()/reduce()]]+Functionality of interest in the successor to the [[rfc:any_all_on_iterable|any() and all() on iterables]] RFC: 
  
-(functionality such as reversed(), flip(iterable): CachedIterable, etc. that would require CachedIterable is left out of this question)+[[https://github.com/php/php-src/pull/6053|Implementation of any()/all()/none()/find()/reduce()]]
  
-(in this proposal, find() and reduce() act only on values of iterablesPassing too many arguments is currently an error for internal functions and it is possible that it would be deprecated for user-defined functions in the future.)+(functionality such as ''reversed()'', ''flip(iterable): CachedIterable'', etc(which would require ''CachedIterable'') is left out of this question)
  
-<doodle title="Global functions I would want to add to PHP to act on iterables as described" auth="tandre" votetype="multi" closed="true">+(in this proposal, find() and reduce() act only on values of iterables, similar to how [[http://php.net/array_reduce|array_reduce]] works. Passing too many arguments is currently an error for internal functions and it is possible that it would be deprecated for user-defined functions in the future.) 
 + 
 +<doodle title="Global functions I would want to add to PHP to act on iterables as described in implementation link" auth="tandre" votetype="multi" closed="true">
    * any(...)/all(iterable $input, $callback = null): bool    * any(...)/all(iterable $input, $callback = null): bool
    * none(...): bool    * none(...): bool
Line 83: Line 85:
    * Still too small in scope    * Still too small in scope
 </doodle> </doodle>
 +
 +==== Preferred namespace to use for iterable ====
 +
 +I didn't notice this earlier, but the [[rfc:https://namespaces_in_bundled_extensions|Namespaces in Bundled Extensions RFC]] recommended (but didn't mandate) that "Namespace names should follow CamelCase." - so I'm not sure if ''iterable\'' or ''Iterable\'' makes the most sense to others.
 +
 +This poll asks whether ''iterable\'' or ''Iterable\'' makes more sense - It could be argued by some that namespaces such as ''iterable\'' should be an exception due to it also being used as a soft reserved keyword that is typically lowercase.
 +
 +https://externals.io/message/114687#114689
 +
 +<blockquote>
 +To me, a lower-case namespace like "iterable" just looks wrong, because
 +I'm so used to namespaces, like classes, being UpperCamels.
 +
 +The connection to a keyword doesn't seem convincing to me - if anything,
 +it highlights the possible confusion from choosing a namespace name that
 +has a different meaning elsewhere, although I admit no brilliant
 +alternatives spring to mind.
 +
 +Regards,
 +
 +--
 +Rowan Tommins
 +[IMSoP]
 +</blockquote>
 +
 +(Aside: shorter namespace names such as iter were unpopular in a [[rfc:any_all_on_iterable_straw_poll_namespace|previous straw poll]], and iter would conflict with https://github.com/nikic/iter)
 +
 +<doodle title="Preferred namespacing for iterable\" auth="tandre" votetype="single" closed="true">
 +   * iterable\ (lowercase)
 +   * Iterable\ (camel case)
 +</doodle>
 +
 +
 +
 +===== References =====
 +https://externals.io/message/114687 "Namespaces in bundled extensions" and iterable additions to the standard library
rfc/cachediterable_straw_poll.txt · Last modified: 2021/06/13 14:33 by tandre