7 ms·
Just for completeness I'll mention that there is another style: start, count This seems to be popular in .NET ecosystem.
by branko_d 4y ago
Just for completeness I'll mention that there is another style:
start, count
This seems to be popular in .NET ecosystem.
- mjmsmith 4y agoNSRange is defined the same way in the (macOS) Foundation framework.
- bouke 4y agoThat’s for creating an enumerable of discrete integers, not for defining an interval.
- branko_d 4y agoIf by "enumerable of discrete integers" you meant Enumerable.Range, it's not just that. Other examples include String.Substring, Array.Fill, Stream.Read, Span constructor etc. If you meant it's not practical for non-integer types such as floats or dates, then of course you are right.
- tmtvl 4y agoI'd say bound, range is an acceptable way of defining an interval, it can save space for multidimensional intervals, though at the cost of increased computation.