Everyone seems to be getting their licks in on the subject of whether strongly typed languages are a good thing or not. So I thought that I would take my turn, and see if maybe this entry could cause a little less jerking of the knee and a little more firing of the neurons.
Terminology problems, psuedo-scientific analogies, ignorant speculations rather than actual observation, etc. Just what you'd expect from an industry leader writing about "types".
Posted to Software-Eng by Patrick Logan on 2/28/04; 10:53:43 AM
Good point. I did try to to add a comment, but apparently you have to register and create a password and all that. I decided to post here instead.
I could not find an email address for him. Isaac, looks like you are registered at his site... do you want to leave a comment with a link over to this discussion?
Anyone is welcome to join lambda and reply, of course. (Please keep in mind the policy about abusive posts).
I should put some meat behind the criticism:
Terminology problems: the old "strong typing" vs. "weak typing" false dichotomy.
Ignorant speculations rather than actual observation: the presumptions of what kinds of applications are built according to those false dichotomies. (They don't exist, so how could there exist such a classification of applications?) Why do a study when you already know the results?
Psuedo-scientific analogies: we are saying something about ourselves when we argue about types? That's kind of obvious. I hope John L. Austin was a bit more formal in his study of linguistics.
Finally, to write: "remember that my claim is one of tendencies, not of absolutes" first of all is equivalent to attempting an automatic dismissal of any counter experience, although he has published nothing to back his claims either. Are these his tendencies or of some unknown origin? What makes them more valid than your or mine?
The problem is these pronouncements come from industry leaders, and do nothing to further real understanding. Instead they polarize an already under-informed mass of developers.
Personally I find the article balanced, despite the fact it ignores modern typesystems. The main point that stricter typing is more likely to help the larger (code/people) the system, seems reasonably straightfoward, and something everybody can agree on, even if one thinks that it never helps more than it hinders.
the old "strong typing" vs. "weak typing" false dichotomy.
I don't understand what is the problem with this. It's not an insult, and most people know it does not mean no typing (runtime crashes). If you think typing is best consumed with moderation, what's wrong with saying so? I'd have no problem inversing the polarity and arguing for weakly dynamic languages against strongly dynamic ones. If "weak" cannot be used, how can the difference be described?
"remember that my claim is one of tendencies, not of absolutes" first of all is equivalent to attempting an automatic dismissal of any counter experience,
No it's not. "Most people have two legs" is not an automatic dismissal of any experience of meeting an amputee. You can disprove tendencies as well as absolutes, it's just harder. A formal survey could confirm or infirm his impression in this case.
What does it balance?
stricter typing is more likely to help the larger (code/people) the system
What is stricter than what? What evidence can you site that demostrates this? (I mean other than what you just personally believe to be true.)
something everybody can agree on
I can't even agree with his terminology, let alone his dichotomoy, or his lack of evidence of a real study. Maybe what he writes "rings true" for you, but that is hardly adding to our deeper understanding.
most people know it does not mean no typing (runtime crashes)
I have experienced first hand for a couple of decades the ignorant misunderstanding around this among developers and managers. These terms a hardly benign.
I witnessed first hand a large corporation (Mentor Graphics) make business-breaking and career-breaking decisions with no more information that what is presented in Waldo's article. That was 15 years ago, and the ignorance is still rampant. Sorry I cannot buy your argument.
If "weak" cannot be used, how can the difference be described?
This has been discussed many times on LtU. Something like "statically checked" and "dynamically checked". The terminology is just the tip of the iceberg, though.
"Most people have two legs" is not an automatic dismissal of any experience of meeting an amputee.
You risk demonstrating your own bias by comparing Waldo's statement with "most people have two legs". Each of us can look around to see people, far and widely with two legs. Almost none of us are in a position to so easily see evidence confirming Waldo's claims.
A formal survey could confirm or...
Excatly.
the old "strong typing" vs. "weak typing" false dichotomy
I don't understand what is the problem with this
Does "strong typing" have a precise meaning?
how can the difference be described?
statically-checked vs dynamically-checked?
tendencies
This is used as an argument that language "popularity" demonstrates the utility of a single aspect of language design.
Informally, I believe that the term, "strength" is used to denote the efficacy of a typing system at achieving its primary task - preventing its users from misinterpreting a value.
This means that there are several aspects that determines the strength of a typing system.
Is it static or dynamic? A static typing system uses a formal proofing mechanism to determine if there are typing errors in the entire program in a separate verification phase which occurs before execution. A dynamic typing system only discovers type errors at execution time.
How flexible is it? If you can't associate or carry a meaningful type with your value, then it doesn't really make any difference that there is a type assigned to it. (Like working with void*'s in C).
What kinds of automatic conversions does the language support? Does the compiler automatically convert unrelated types from one to another - i.e. a pointer to an integer, an object to an array, etc... Does the language encourage programmers to create automatic conversions between unrelated types?
What is the depth of constraints that can be enforced by the typing system? For example, does it support nullable/non-nullable (aka option) types?
God bless, -Toby Reyelts
You illustrate very well the complexities that should be addressed when discussing "types". This is exactly what is over-simplified in the typical (e.g. Waldo) presentations.
I think not. You can say meaningfully that a language has static or dynamic typing, and you can say its type system is safe (sound) or unsafe (unsound), but strong vs. weak is not well-defined. I think there is a passage in Benjamin Pierce's to this effect, but I don't have it handy at the moment.