On Wednesday, 14 March 2018 at 05:22:53 UTC, rumbu wrote:
I doubt that this was the blocker because C# had
ArraySegment<T> since .net framework 2.0 (2006), which is
exactly a slice, but doesn't have the syntactic sugar for it.
If it doesn't have the syntactic sugar how is it "exactly a
slice"?
The current C# proposal introduces a syntactic sugar similar to
D (using ":" instead of "..") and extends the concept to stack
arrays, because ArraySegment was limited to managed arrays.
If it's limited to managed arrays how is it "exactly a slice"?
Please stop repeating this fallacy, I have already corrected you
once in another thread where you made the same claim about
ArraySegment. I am also a C# developer and I can assure you that
ArraySegment<T> has very little in common with a D slice.
It is a segment of an array of type T only! That's it!
You can't construct it from stack, static, native, memory-mapped
or any other memory, and you can't coerce the type. Because it
doesn't have the 'syntactic sugar' it is unusable for all
practical purposes!