On Wednesday, 4 July 2012 at 08:20:59 UTC, Mehrdad wrote:
I propose we just allow (but not require) popFront() to return ElementType!(R) instead of void?

That way, people who need the performance can check to see the return type, and use it without front() if needed.

That would be almost perfect. But has drawbacks:

* if element is big and may be not needed in all calls to popFront (when the user wants to ignore elements), there would be some overhead;

* it might be impossible to change some ranges which would work with current design; I'm not aware of such cases, though

* something else?

Reply via email to