[phobos] Fw: Split std.datetime in two?
Steve Schveighoffer
schveiguy at yahoo.com
Fri Feb 11 13:19:35 PST 2011
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 <schveiguy at yahoo.com>
> To:Robert Jacques <sandford at jhu.edu>
> Cc:
> Sent:Friday, February 11, 2011 4:18 PM
> Subject:Re: [phobos] Split std.datetime in two?
>
> ----- Original Message -----
>
> > From:Robert Jacques <sandford at jhu.edu>
> >
> > 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
More information about the phobos
mailing list