On Tuesday, 6 February 2018 at 09:02:46 UTC, Simen Kjærås wrote:
On Tuesday, 6 February 2018 at 02:14:35 UTC, Meta wrote:
What do you think?
It's already possible, with only very slightly worse
aesthetics:
[Good stuff]
We can do better than that, though:
[More good stuff]
The problem in your sample is that you turn a range into a new
slice with .array (which is "alias this" also), and this
allocates.
Meta's solution brings slices into the range world instead
(rather than ranges to array ops like originally proposed).