Nick Sabalausky <a@a.a> wrote:
f[1..5] // opSlice with ints, or opIndex with a range?
This is also an interesting point. If a..b were to be a separate type, opSlice would no longer need to exist, it could be a simple overload of opIndex. This would easily enable multi-dimensional slicing, which currently is impossible in D (barring tricks like using opIndex behind the scenes and a struct with overloaded slicing to create the slice indices: foo[ _[0..1], _[2..3] ];). -- Simen