The static/dynamic albatross
Nothing strikes me as more pointless than the static/dynamic typing argument in the programming languages community. So much time has been wasted on this topic that it almost brings a tear to my eye.
That being said, there are sometimes diamonds in the perennial rough. These quotes are representative of my views on the matter.
Two from Kent M. Pitman in the c.l.lisp thread Does ANSI Common Lisp have pattern matching?.
Language choices are not about Good vs Bad, they are about design trade-offs: you trade away the things you don't plan to do in favor of the things you do plan to do. The hard part is getting that planning right so you aren't pinned into a corner down the line. Since Lisp supports changing one's mind later, I tend to like that, but it comes at some occasional costs, and I think there's a minor but manageable cost on the issue of clarity of intent on certain intentional type issues. It's not a cost that troubles me because it buys other things I care about. Static typing feels like a stranglehold to me. But it's worth acknowledging that there are people who will be troubled by these design trade-offs because they value things differently.
and
The static/dynamic thing was not done as a way of saying, as a community, "we're too lazy to do things up front where they belong". Rather, we as a community have said "we want to first choose what we want to say, and when the right time is to say it, and only after that is done will we see about making that maximally efficient".
Next, Anton van Straaten has a comment over at Lambda the Ultimate.
I'll state for the record that I don't like what I see as a false dichotomy in the static/dynamic debate — what I'm really looking forward to in the future is a more sophisticated attitude towards types from both camps. Dynamic advocates who see absolutely no benefit to static checks are missing the fact that the programs they write are full of static types which they actually reason about, even if they don't realize it; but static advocates who think that a universal type encapsulates everything there is to know about dynamic languages are, funnily enough, missing the exact same point. (emphasis his)
I'm sure there will be plenty more rough of this nature in the future. I at least hope that diamonds keep coming with it.

3 comments:
It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much---the wheel, New York, wars and so on---whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man---for precisely the same reasons.
- Douglas Adams, The Hitch-Hiker's Guide to the Galaxy
Well said!
"Since Lisp supports changing one's mind later, ..."
In contrast to the programming languages that do a one way encrypt of the source code when you save the source file?
"A very great part of the mischiefs that vex the world arise from words. People soon forget the meaning, but the impression and the passion remain."
Edmund Burke 1793
Post a Comment