meetings/2018/LDM-2018-03-28.md
Warning: These are raw notes, and still need to be cleaned up. Read at your own peril!
Ranges
We would like to ship a prototype of ranges, in order to get feedback and settle the remaining decisions.
We would need to offer the Range type, maybe as a NuGet.
But it would also be nice to offer range-enhanced other types, like Span<T> and maybe arrays.
Maybe the compiler can fake out special indexers in the prototype. Or we also add extension indexers.
Tying it to revs of .NET Core previews may be too sluggish, and fraught with dependencies.
Or we create a wrapper type for Spans with the extra behavior, and smooth over the edges as best we can (implicit conversions etc)
Let's do:
Range, associated types and "extension indexers" on known typesWe have two options:
The first one is the more restrictive, and also the cheaper one (from both work and number of abstractions). This will help us understand whether people need the extra.
But not supporting "from end" is too restrictive; we have very good reason to believe people need that.
Issue #1412, trivial to implement in 8.0, where the stack-spilling machinery is there anyway for pattern matching.
Should non-exhaustiveness be an error or a warning? If warning, what should happen at runtime?
For now, it's a warning, and if you get there we throw a new exception type for this.