On Wednesday, August 18, 2010 16:36:07 David Simcha wrote:
> A valid criticism in general.  However, all of the ranges in question
> are templates, so each instantiation is compiled in whatever mode your
> program is compiled in.

Ah good point. I missed that. That being the case, I'd probably lean towards 
assertions. Ranges need to be high performance. They should have very clear 
error messages with them rather than be bare assertions (so hopefully the 
programmer will realize that it's _their_ bug and not Phobos'), but still 
assertions. I think that ranges are too performance critical for enforce() if 
assertions are actually useable (and as you point out, since they're templates, 
assertions will be useable). So, I'd vote assertions.

- Jonathan M Davis
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to