You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
In plenary, some argued for passing a second index parameter to the Array.prototype-like methods' callbacks. I'm not entirely opposed to this but I'm unconvinced at the moment that this is an improvement. Also, I am really uninterested in adding separate "indexed" versions of each helper, as was mentioned. Here's how I see the pros/cons of each approach.
Motivation for not passing an index
index is not useful for lookaround indexing pattern
besides, we will have better patterns for this that don't involve indexing, such as zipping
indices are relative to in-progress iteration, not some indexable structure
it's easy to change the base of these indices when introducing a drop/filter/etc earlier in the chain
In plenary, some argued for passing a second index parameter to the
Array.prototype-like methods' callbacks. I'm not entirely opposed to this but I'm unconvinced at the moment that this is an improvement. Also, I am really uninterested in adding separate "indexed" versions of each helper, as was mentioned. Here's how I see the pros/cons of each approach.Motivation for not passing an index
drop/filter/etc earlier in the chainparseInttoArray.prototype.mapArray.prototypemethods (likezipWith,takeWhile,tap), we create a weird divideMotivation for passing an index
Array.prototypemethodsindexed()to the chainIterator.prototype/cc participants: @js-choi @waldemarhorwat @ljharb @bakkot @erights @rbuckton @littledan