Static typing is so last century
In the article Schizoid Classes published on the ACM Queue, Rodney Bates (of Wichita State University) does a good job of explaining what's wrong with the class models of the curly-braced mainstream langauges.
However, in his last paragraph, he says:
"Smalltalk pays a high price elsewhere for taking object orientation to the extreme, notably in complete loss of static typing and serious runtime efficiency penalties. Special, one-instance forms of classes are, for many programming problems, not as good a conceptual match as modules. But at least it provides a single, consistent, and syntactically explicit call mechanism."
He's right to say that "special, one-instance forms of classes are, for many programming problems, not as good a conceptual match as modules." But he's demonstrably wrong to say that "Smalltalk pays a high price elsewhere for taking object orientation to the extreme, notably in complete loss of static typing and serious runtime efficiency penalties."
Firstly, it is only sometimes true that Smalltalk pays a measurable performance penalty due to the lack of primitive types. In fact, it is very often the case that Smalltalk programs benchmark as faster than equivalent programs written in C++, C# or Java--for any of a variety of reasons I won't go into here.
Secondly, Smalltalk pays no net penalty for its lack of static typing--commonly-believed myths to the contrary notwithstanding. In fact, it receives the net benefit of making developers more productive and making code more generic and reusable.
Static typing is so last century. Interest in dynamic languages is growing. A Kuhnian revolution may be brewing. I sense that it won't be long now before the general community of programmers wakes up to reality, and stops believing the myths of the past.
No comments:
Post a Comment