On Friday, 10 January 2014 at 19:57:56 UTC, Andrei Alexandrescu wrote:
On 1/10/14 7:23 AM, Manu wrote:
This is what I've done. I'm just surprised that such an obvious function
doesn't exist, and suspect I was just retarded at phobos again.
Having a function that does this is kinda important to simplify lots of expressions that otherwise need to be broken out across a bunch of lines.

I doubt it simplifies a lot.

A lot, no. Enough to justify its existence, yes. IMHO anyway.


Does nobody see this coming up in their code? I have it basically every time I use ranges, and as usual, surprised others don't feel the same way.

If it would have been frequent, it would have been a common request. Apparently it isn't. Even before ranges there wasn't a function that got you s[0] and also assigned s = s[1 .. $] in one shot, and that wasn't asked for either.

I think anybody who wanted it, like me, just wrote their own utility function and moved on.

Atila

Reply via email to