This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Static Dynamic - the Meijer/Drayton paper
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
I've had a number of people tell me that I should read the Meijer/Drayton paper on static and dynamic typing (PDF). I finally got around to that today - I had a notion of where the authors were headed after I read the following (follow the link for the citations):
In the mother of all papers on scripting [16], John Ousterhout argues that statically typed systems programming languages make code less reusable, more verbose, not more safe, and less expressive than dynamically typed scripting languages. This argument is parroted literally by many proponents of dynamically typed scripting languages. We argue that this is a fallacy and falls into the same category as arguing that the essence of declarative programming is eliminating assignment. Or as John Hughes says [8], it is a logical impossibility to make a language more powerful by omitting features. Defending the fact that delaying all type-checking to runtime is a good thing, is playing ostrich tactics with the fact that errors should be caught as early in the development process as possible.
And there's the baseline assumption that static advocates make - dynamic typing will lead to runtime errors, so we just have to deal with that problem. I've been using Smalltalk for years now, and the number of those errors I've seen in a runtime image is a really small number - 2 that I can recall. The rest of the paper is mildly amusing. To my mind, it points out all the complexity inherent in having static typing, and then explains:
Static typing is a powerful tool to help programmers express their assumptions about the problem they are trying to solve and allows them to write more concise and correct code. Dealing with uncertain assumptions, dynamism and (unexpected) change is becoming increasingly important in a loosely couple distributed world. Instead of hammering on the differences between dynamically and statically typed languages, we should instead strive for a peaceful integration of static and dynamic aspect in the same language. Static typing where possible, dynamic typing when needed!