toHash => pure, nothrow, const, @safe

Jonathan M Davis jmdavisProg at gmx.com
Mon Mar 12 11:10:23 PDT 2012


On Monday, March 12, 2012 11:04:54 H. S. Teoh wrote:
> Tangential note: writing unit tests may be tedious, but D's inline
> unittest syntax has alleviated a large part of that tedium. So much so
> that I find myself writing as much code in unittests as real code.
> Which is a good thing, because in the past I'd always been too lazy to
> write any unittests at all.

D doesn't make writing unit tests easy, since there's an intrinsic amount of 
effort required to write them, just like there is with any code, but it takes 
away all of the extraneous effort in having to set up a unit test framework and 
the like. And by removing pretty much anything from the effort which is not 
actually required, it makes writing unit testing about as easy as it can be.

I believe that Walter likes to say that it takes away your excuse _not_ to 
write them because of how easy it is to write unit tests in D.

- Jonathan M Davis


More information about the Digitalmars-d mailing list