std.range.cacheFront proposal&working code: wraps a range to enforce front is called only once
Jonathan M Davis
jmdavisProg at gmx.com
Thu Oct 24 17:18:54 PDT 2013
On Friday, October 25, 2013 00:05:26 deadalnix wrote:
> OK let me restate : it would give random access a different
> semantic than in order access. Which is undesirable.
Yeah. It's a tradeoff, so it's debatable as to which way would be better. In
general though, it's better to put the work in popFront. It's less likely to
incur an efficiency hit and less bug-prone that way.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list