Lambda the Ultimate

inactiveTopic Waldo on "Types"
started 2/28/2004; 9:57:40 AM - last post 3/2/2004; 12:45:53 PM
Patrick Logan - Waldo on "Types"  blueArrow
2/28/2004; 9:57:40 AM (reads: 10516, responses: 14)
Waldo on "Types"
Jim Waldo enters the fray...

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

Isaac Gouy - Re: Waldo on  blueArrow
2/28/2004; 10:22:54 AM (reads: 759, responses: 1)
When we have negative comments on someones writings, my preference would be to invite them to respond on LtU. (Or to comment directly in the original forum.)

Patrick Logan - Re: Waldo on  blueArrow
2/28/2004; 10:59:02 AM (reads: 753, responses: 0)
When we have negative comments on someones writings, my preference would be to invite them to respond on LtU. (Or to comment directly in the original forum.)

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?

Ehud Lamm - Re: Waldo on  blueArrow
2/28/2004; 3:17:59 PM (reads: 697, responses: 0)
My policy in general is to link to things I like instead of linking and adding criticism. But sometimes, you simply can't help youself..

Anyone is welcome to join lambda and reply, of course. (Please keep in mind the policy about abusive posts).

Ashley Yakeley - Re: Waldo on  blueArrow
2/29/2004; 3:19:57 AM (reads: 649, responses: 0)
Well quite. There seem to have been a rash of articles on types recently by various people whose idea of a strongly typed language is C++. I'm getting a bit sick of it, really, especially as I suspect there may very well be a reasonable criticism of my own adherence to the One True Church of Static Typing as Revealed by Hindley, Milner, Damas, Peyton-Jones and Many Other Prophets, but I haven't come across it.

Patrick Logan - Re: Waldo on  blueArrow
2/29/2004; 6:14:52 PM (reads: 525, responses: 0)
The one thing I would do differently next time would be to post the artcile on the home page without the criticism. I would then put my personal criticism in the discussion itself.

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.

Franck Arnaud - Re: Waldo on  blueArrow
2/29/2004; 7:26:10 PM (reads: 515, responses: 0)

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.

Patrick Logan - Re: Waldo on  blueArrow
3/1/2004; 7:08:58 AM (reads: 459, responses: 0)
Personally I find the article balanced

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.

Isaac Gouy - Re: Waldo on  blueArrow
3/1/2004; 7:57:11 AM (reads: 447, responses: 0)
stricter typing is more likely to help the larger the system
Why? Presumably we're doing something to limit interactions between different parts of the software (otherwise we're going to get into a mess anyway).

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.

Toby Reyelts - Re: Waldo on  blueArrow
3/1/2004; 11:16:26 AM (reads: 410, responses: 0)
Does "strong typing" have a precise meaning?

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

Patrick Logan - Re: Waldo on  blueArrow
3/1/2004; 11:38:14 AM (reads: 397, responses: 0)
Toby,

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.

Frank Atanassow - Re: Waldo on  blueArrow
3/2/2004; 9:50:35 AM (reads: 283, responses: 1)
Does "strong typing" have a precise meaning?

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.

Ehud Lamm - Re: Waldo on  blueArrow
3/2/2004; 12:17:12 PM (reads: 255, responses: 0)
Shriram also talks about this in his online PL textbook.

Isaac Gouy - Re: Waldo on  blueArrow
3/2/2004; 12:45:53 PM (reads: 249, responses: 0)
Does "strong typing" have a precise meaning?
Guess I should have tagged that <rhetorical question> ;-)