Grrr.. can you guys stop replying all? My mailer keeps trying to send to individuals instead of the list, and I have to keep remembering to fix it.
-Steve ----- Forwarded Message ----- > From:Steve Schveighoffer <[email protected]> > To:Robert Jacques <[email protected]> > Cc: > Sent:Friday, February 11, 2011 4:18 PM > Subject:Re: [phobos] Split std.datetime in two? > > ----- Original Message ----- > > > From:Robert Jacques <[email protected]> > > > > On Fri, 11 Feb 2011 14:20:09 -0500, Steve Schveighoffer > > > > > > foreach(x; someLongArray) > > > assert(foo(x) > 5); > > > > > > which x caused the problem? all I get is the line number for the > assert. > > > > *sigh* > > > > foreach(x; someLongArray) > > assert(foo(x) > 5, text(x) ); > > > > Problem solved. Personally, I don't usually add the extra clause to > assert > > during initial coding; only when they fail do I add something like > > text("\nx:\t",x,"\nfoo:\t",foo(x)); or > > whatever. (Though enforces are a different story) > > It would be nice if this happened automatically, I think this is what is > planned. > > But yes, it could be done this way. I still don't feel that this is far > superior to an unrolled list of tests. It's not obvious what is happening > without either running it or working through the context. > > Something like this is acceptable, but also unrolled loops are acceptable to > me > (and actually preferred). > > -Steve _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
