Sunday, May 30, 2010

Languages are magical!

I love programming and though I am loathed to admit it, I also love my chosen programming languages. Like many programmers I act like there is "one true path", the one true path is of course Python! Many a writer has been down this road before, yet I am still compelled to do the same. Why? Because I noticed something about myself that both surprised and disappointed me, I get angry when I hear someone bad mouthing Python.

I would like to think that I am above all that, that I and all those who are truly enlightened have long since moved past Vi versus Emacs, Perl versus Python, Dynamic versus Static typing and dare I say it even Windows versus Linux. I am wise therefore I know that these things all have different reasons for being and different places in history, thus a direct comparison of their merits and demerits is a fool's errand. Yet even here in the programming ivory tower, things are not so simple.

If I were truly enlightened I would start every new project1 with an evaluation of the best tools to use, one of the most important being the programming language. The primary criteria for selection if I am being completely rational should be fitness for purpose. However it is almost inconceivable that unless I have no choice in the matter2 that I would use anything other than Python. There are of course cases where this would be completely insane. When I am tinkering with the Arduino I use Processing, a great language it's own right, other than that I default to Python.

Much ink has been spilt addressing this issue directly, but I got more clarity from writers that were addressing orthogonal and indeed probably more important issues than the programming language wars. Eben Moglen the brilliant lawyer/historian/activist and once programming language designer said when Graphical User Interfaces were first becoming popular he did not perceive this as a good thing. In his opinion the key issue in computing was how we communicate with computers and each other, therefore language is where he thought at the time the focus should have been. In the context of Artificial Intelligence Terry Winograd and Fernando Flores in their book: Understanding Computers and Cognition -- A New Foundation for Design  placed similar importance on language when create what became known as the Language/Action Perspective. They said: "our position therefore in accordance with the preceding chapters is that computers cannot understand language"3. Concluding that since we cannot get computers to understand language: "software is unlikely to ever exhibit intelligent behaviour". These statements purportedly caused the nuclear winter in AI, but I digress.

What I take from all of this is that language is really powerful, powerful to the extent of appearing magical. Since it is magic, once you know one kind of magic, like the queen of Narnia it is inconceivable to us that there may be a deeper magic, of which we are not yet aware. So why do we obsess about our programming languages? Simple, because languages are magical!



Footnotes:

1.Ok maybe not every new project, it would probably not be a good idea to write three web applications in succession with different tool-sets.

2.For example if I join an existing project already using certain tools.

3.The original paper is from mid-1980's, in the fullness of time they may be proven wrong but that is what they said at the time.