[article] Language Design Deal Breakers

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sun May 26 01:50:25 PDT 2013


On Sat, 25 May 2013 22:14:06 -0700
"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote:
> 
> D's unittest blocks have singlehandedly converted me from a
> code-by-faith person full of every excuse to *not* write unittests, to
> somebody habitually writing unittests.

Same here. And I'd bet it's a common story among D users.

> The quality of my code has
> improved by leaps and bounds. And I like writing exhaustive unittests,
> because they give me the confidence that 50 iterations down the road,
> the obscure corner cases in my code are still working correctly, and
> no subtle bug has crept in since. I like having that level of
> confidence in my code, esp. in pieces that get reused a lot. It saves
> a LOT of headaches and time spent trying to track down obscure bugs.
> 

When I was writing my SDL lib, I unittested the crap out of the lexer.
I really didn't feel like doing it, but I figured I had no excuse not
to.

It caught an absolutely enormous amount of bugs.

It also helped me understand the nuances of the language's tokenization
better. And that, in turn, managed to help me catch some problems in
the behavior of not just the existing Ruby implementation, but even the
original Java implementation.



More information about the Digitalmars-d mailing list