From: Ryan Pavlik Date: 2003-02-13T10:45:41+09:00 Subject: Re: von Rossum on Strong vs. Weak Typing On Thu, 13 Feb 2003 10:10:44 +0900 wrote: > Since this is something of a permathread on this list I though this > would be of interest: > > > Strong versus Weak Typing > A Conversation with Guido van Rossum, Part V > by Bill Venners with Frank Sommers > February 10, 2003 > > http://www.artima.com/intv/strongweak.html Interesting, although he doesn't seem to know the difference between _strong_ and _static_ typing, as evidenced by: The container problem is one issue. It's difficult in a language without generics to write a container implementation that isn't limited to a particular type. And all the strong typing goes out the door the moment you say, "Well, we're just going to write a container of Objects, and you'll have to cast them back to whatever type they really are once you start using them." That means you have even more finger typing, because of all those casts. And you don't have the helpful support of the type system while you're inside your container implementation. That's static typing, not strong typing. Static typing means a symbol (or variable) is tied to a type. Strong typing means something requires a particular type. The difference is sometimes subtle, but important. More misunderstanding: Guido van Rossum: Well, they have to, because it is a strongly typed language, and you can't do certain things with strong typing otherwise. Weak typing is not really a fair description of what's going on in Python. It's really runtime typing because every object is labeled with a type. Actually it's somewhat of a shame that there's this constant confusion, especially by "prominent" members of the community, who hurt matters. He implies here that strong typing is limiting, when he means _static_ typing instead. Strong typing actually gives you _more_ flexibility. Common Lisp is a great example of something that has strong, dynamic typing. (Actually the strong bit is optional, but then, so are most things in Lisp. ;) Also, ruby can do strong, dynamic typing with my strongtyping module (on the RAA). ;-) I know this is a hot topic, and I'm not going to push the matter one way or the other. You can write code either way you like. Being able to do both should be seen as a sign of great flexibility in a language. I don't like to see the misconceptions and confusion as in the above quotes, though. -- Ryan Pavlik "I distinctly remember dancing on your grave." - 8BT