July 22, 2010 [Issue 4492] Version of take() which takes from the back of a range | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=4492 --- Comment #10 from Jonathan M Davis <jmdavisProg@gmail.com> 2010-07-22 16:43:14 PDT --- I wasn't aware that you could generally use subscripts on ranges such as range[range.length - n .. range.length] But I guess that it would make sense for random access ranges to have that, and if you have to have a random access range to efficiently implement takeBack()/takeTail() anyway, then you already have what you need. In that case, the one argument that I'd make for takeTail() would be that it might be better for generic code (it's also a bit cleaner to say takeTail(range, n)), but if you're restricted to random access ranges for such code anyway, then it probably doesn't really gain you anything since you can't really genericize something that has to be specific. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 09, 2011 [Issue 4492] Version of take() which takes from the back of a range | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | http://d.puremagic.com/issues/show_bug.cgi?id=4492 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody@puremagic.com |andrei@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation