`openarray` as a concept was raised here: 
[https://github.com/nim-lang/Nim/issues/6528](https://github.com/nim-lang/Nim/issues/6528)
 but in light of the discussion for memRanges/slices/pointer+len/span that 
happened here:

>   * 
> [https://github.com/nim-lang/Nim/issues/7337#issuecomment-373641158](https://github.com/nim-lang/Nim/issues/7337#issuecomment-373641158)
>   * 
> [https://github.com/nim-lang/Nim/issues/5753](https://github.com/nim-lang/Nim/issues/5753)
>   * 
> [https://github.com/nim-lang/Nim/pull/5957](https://github.com/nim-lang/Nim/pull/5957)
>   * 
> [https://github.com/nim-lang/Nim/issues/5437](https://github.com/nim-lang/Nim/issues/5437)
> 


I'd rather have openarray be renamed span (slice and range are taken) and be 
able to cover (borrow) anything from arrays/seq to slices to pointer+len 
**without copy**.

Furthermore an `Iterable` concept can be introduced (which would work with 
openarray and user-defined types). `items` and `pairs` can work on this 
`Iterable` concept.

Similarly, an `Indexable` can be added for `[]` and co. Those concepts can be 
added to sugar.nim.

Reply via email to