You Need a Debugger to Change the World

Posted

Following links from the latest Subtext demo, I came to Martin Fowler’s article “Language Workbenches: The Killer-App for Domain Specific Languages?”. It’s well written and thought provoking, like everything else Martin writes, but I think there’s one glaring oversight. Two thirds of the way through, he says:

…there are three main parts to defining a new DSL [Domain Specific Language]:

That’s great—but #4 should have been:

Now, you could claim that the debugger was implied by #2 (the editor), but i practice, it never works that way. Time and again, I see people struggling with systems that don’t provide tools for debugging: Makefiles, Antfiles, config.xml files for servlet containers, and on and on and on. When something goes wrong, the only options are (a) tweak it until it converges on what you wanted, or (b) debug the implementation of the nice abstraction you were just thinking in.

I think that the inability of today’s C++ debuggers to display something useful when confronted with templated code is the singlest biggest obstacle to their wider use. I think that Java made a horrible mistake in deciding to erase type information when compiling generics, so that what’s actually executing can only say, “Yup, it’s another Object.” Extensible languages could revolutionize software development, but it’ll only happen if we focus on closing the debugging gap.

So, anyone looking for a Ph.D. topic? ;-)