Everything is a DSL
From time to time, I’d write a post that will fall a touch on the controversial side. What’s great about those articles is how they end up being a rewarding experience for me. After wading through the messages of the over-offended and the hyper-defensive, I always leave having learned a thing or two, often more.
The technical knowledge acquired from these situations, I surely classify as my undisputed number one. But there’s more than one ways to enhance understanding…
I particularly enjoyed the reaction to Rails: Not a DSL, specifically by the ruby-ists out there. Seems like the piece hit a nerve, because it’s the first time I saw Rails peeps behaving like Java guys when they first heard Ruby will kill Java. Not everyone, of course, but certainly some of the ones who got over excited about DSLs after attending the recent RailsConf…
The other insight I was provided with by the reaction to the aforementioned post was what a large slice of the DSL-tastic pie regards DSLs as. The popular notion seems to be that DSLs are programming language agnostic: You don’t write a Domain Specific Language. You write on any programming language in a Domain Specific Language. Apparently, what you do is express your code in syntax that is expressive to the business or application domain. DSLs, thus, are all around us. Rails is a DSL. JMock is a DSL. The parts that we got right from the last few projects I worked on are DSLs.
Under those assumptions, allow me to add another name for DSL. It’s called Writing Good Code.
How such a basic principle suddenly became the focal interest point of the restless programming world I do not know, but I’ll let you draw your own conclusions. To be honest, I can only be happy about it, because happy is what I’m going to be next time I read somebody’s code and it reads well and it makes sense in the context of the world it is written to express and it makes me want to work on it instead of complaining (my hobby). And if that’s because of DSL-Mania, go for it, people.
But I can’t deny that a DSL to me is something completely different.

July 21st, 2006 at 10:00 am
Great link to the post from Howard Lewis Ship!
July 21st, 2006 at 10:48 pm
Ah, but I’m not a rubyist. And I actually first ran across (and remembered) the quote from Bjarne when I bought his book in 1995, years before I ran across Ruby. (Incidentally, I also toyed with Inform back in the same time period. Not sure if I’m convinced by the new language, but Graham Nelson does have experience at the thing.)
Anyway, enough meta-counter-counter-counter arguments, and I do enjoy your blog. Just worth bringing up multiple sides to the argument.