Home‎ > ‎

Better software through syntax

 Take three trends and think about them: the first is that design patterns frequently become absorbed into language features, the second that improvements in the safety and stability of software came with improvements to the languages, and the third is that many new features in software were inspired and enabled by new features in the language. Extrapolate from this an idea: to write better software, first create better syntax. Or say you enjoy the power of your favorite dynamic or scripting language, what if--on your next major application--you created a variant of that language specifically for writing your new application in, and then you wrote the application in it? What if, when your application called for a new feature, you invented syntax for expressing the feature first, and then you modified the language to support that new syntax?

 This is what the future of software development is. You create new syntax for a specific job and then you use that syntax for the job; you work from both sides of the compiler.

 I've been experimenting with this idea, beginning with XML. I use XML to define the behavior of a program in a make-believe syntax, then I look to implementing that syntax. I've found that I have to switch back and forth as I get closer to the working prototype because something I discover in the language implementation forces a change in my invented syntax and vice-versa. I chose XML because, at the time, it was an accident. But since that accident I've made these imaginary syntaxes lean towards being functional in style, instead of imperative.