I just kind of wish Lua could catch these types of bugs automatically like a C compiler can

Another day, another bug in “Project: Sippy-Cup [1].” This time a simple typo, the type of typo that a compiler would have caught before the code was checked in. And it's the type of bug that is the most prevalent in my code.

I'm beginning to see why unit testing [2] is so popular with the scripting/dynamic languages—they catch the types of bugs that compilers of static languages already catch.

On the down side, unit testing ensures that I get to play “compiler” far more often than I care to …

Sigh.

[1] /boston/2014/03/05.1

[2] http://en.wikipedia.org/wiki/Unit_testing

Gemini Mention this post

Contact the author