Is this a bug in iota?

bearophile bearophileHUGS at lycos.com
Wed Apr 18 20:36:59 PDT 2012


Brad Anderson:
> You can popFront() for as long as you want well passed the 
> length. Obviously popping off the front of a zero length range 
> isn't valid but I would have expected a range violation to 
> occur rather than it to silently continuing the series with a 
> wrapped around length.

I think it's a matter of design and it's a matter of having an 
alternative Phobos release that contains asserts too. Adding the 
test slows down something (iota) that must be as fast as 
possible. And currently asserts are removed from the compiled 
Phobos...

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list