funcky icon indicating copy to clipboard operation
funcky copied to clipboard

Usability of `CycleRange` and `RepeatRange`

Open tautropfli opened this issue 2 years ago • 1 comments

CycleRange returns an IBuffer which brings with it the need to dispose the result which is not very practical.

I think we should add an overload for readonly lists that returns a regular old IEnumerable (that's easy because the list is already materialized).

We can either add an overload of the existing CycleRange (that's a source breaking change though). Alternatively we can use a new name (e.g. CycleList).

tautropfli avatar Jul 24 '23 07:07 tautropfli

I think the names should be different, and I think List is the best name for this kind of abstraction:

alternative suggestions, I list stupid ideas too, to make us think one more time:

  • Repeat/CycleMaterialized
  • Repeat/CycleEager(Range, Collection)
  • Repeat/CycleInMemory
  • Repeat/Cycle

We could mark this feature as Experimental as long as we are not sure about the name.

FreeApophis avatar Dec 04 '23 08:12 FreeApophis