Get your kaftan, we’re talking Lisp
Tags: development , humour
Anyone who has been in the software industry for a decent period of time is bound to have come across at least one Lisp fanatic, or Lispian. They are rare beasts, for sure, but what they lack in numbers they more than make up for in dedication to the object of their fanaticism. Unlike Java or C# hackers Lispians have a real air of self-satisfaction about them; they aren’t just passionate about the prospect of using a neat tool for cutting code, they’ve been to the top of the mountain and they’ve seen the other side.
For a long time I politely ignored this mildly discomfiting aspect of the Lispian’s character, assuming that one day they would all end up in a secluded compound in the desert, happily coding Arc with Paul Graham. But the thing is, I’m just not not that patient. If someone’s walking around with a serene glow, experiencing inner peace, then I want some of it, or I at least want enough superior knowledge to outsmug them.
I’ve tried to teach myself Lisp on more than one occasion, and each time come away mildly competent in the basics but frustrated at the lack of knowing smile and spiritual contentment. And then in the same week I happened to read an article on defmacro.org and a number of similarly themed essays on domain languages, and the penny dropped.
In very Zen and the Art of Motorcycle Maintenance terms, the secret isn’t in what the Lisp language is, it’s in what it represents.
Just Robert Pirsig said in the book when explaining the idea of using an ad-hoc fashioned metal shim to stabilise loose motorcycle handlebars - it may be just a coca-cola can cut into shape by tin snips, but it represents an elegant and optimal solution to the problem.
Obi-Wan Kenobi himself may have said
First understand the problem, Luke, then see the practical solution, not the can.
I’m still enough of a newbie to find the density of thought and excessive use of brackets in Lisp confusing, but I am starting to get a curious feeling that it might be time order my crimson robes.
I’ve spent more than twenty years as a kind of software journeyman, wandering from project to project, industry to industry, staying in one place anywhere from a few weeks to a few years to earn my crust. The industries I’ve worked in include investment banking, software houses, financial services, government, retail, utilities, military, and telecommunications.
Most of these organisations, at least to some extent, employed Java as their development language of choice. Now what are the chances, really, that Java is the ideal language to express the solutions to business problems in all these industries? I’d say not very high. Java was chosen because of the availability of people that know it, not because it fits the problem domain better than any other language.
And Java works fine (after a fashion) because in each corporate location it’s been put to use, the classes, methods, packages and components of the JEE are selected and tailored to the domain in question. Perhaps not very well in some cases, but over time what is being created is a language specific to the domain, with nouns (classes) that represent ideas or entities and verbs (interfaces and methods) that act upon them.
Let’s forget Java for a second here, because I could just as easily use C# or COBOL or any high-level language that’s popular, and see what’s happening.
Each business is developing a tailored language of sorts. Not explicitly in most cases, I grant you, but something to express their business operations and needs. Therefore it’s self-evident that any mechanism that makes it easier to define this tailored language is going to be a good thing. And that good thing will have to have some pretty special properties that deal with fundamental things like types, data, classes and their instantiated brethren, objects, and even properties to deal with the way the language works with itself.
And, as I reach for my guitar, I have to admit that, so far in my meanderings, Lisp appears to have those special properties. What’s strange is that, with Lisp, even when I instinctively disagree with it, I find my instincts to be wrong, which is annoying but, dare I say it, curiously enlightening.
I still hate the brackets (surely it would look more lovely if it were structured like Python or Ruby?), but I’m stepping off the Greyhound in a remote corner of Texas, and I’m at the compound door.
I’m a little shy and not quite ready to go in yet, but I can see Paul waving from the window.
He says he’s been expecting me.