Testing array ptr for offset 0...

Alex Parrill via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 26 05:30:30 PDT 2016


On Thursday, 26 May 2016 at 07:51:46 UTC, Era Scarecrow wrote:
> ...

This smells like an XY problem [0]. Why exactly do you need the 
internal layout of the array structure?

The line "not having to make another array to keep track of 
lengths and then shorten them" is fairly vague. "Shortening" an 
array via slicing is basically free (it's just some integer 
arithmetic), but I'm not sure if that's what you meant.

[0]: 
http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem


More information about the Digitalmars-d-learn mailing list