Ranges - Question about desing choices
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 24 08:16:10 PDT 2015
On Monday, 24 August 2015 at 15:09:14 UTC, Michal Minich wrote:
> What are the advantages of current design.
One advantage of the current design is you can statically
determine if something is an infinite range by seeing if empty is
a constant false. With your change, you could never be sure if
something was infinite or not since popFront would just keep
returning true.
It is also sometimes useful to see if something is empty without
modifying it, like when doing a wrapper.
More information about the Digitalmars-d-learn
mailing list