weak versus dynamic, definitional origins

Tim Peters tim.one at comcast.net
Fri May 16 23:47:45 EDT 2003


[Courageous]
> ...
> A very clear way of putting it. Now on to the question. Anyone know
> about the schism in nomenclature that appears to be going on here?
> I can find definitions of strong typing that make python weakly
> typed. Clearly we know what we mean when we say it, I just have a
> passing curiousity regarding when the community started attempting
> to redefine the terms so that python could be said to have "strong"
> typing. Not long ago, wasn't so.

Which community?  A point I tried to make about 500 times <0.4 wink> in the
tedious parts of the "passing by refference" thread is that there's no
consensus across groups about the meanings of many "computer science"
phrases.  You have to know who's speaking before you can know what they
intend by a phrase.  Lisp people(*) have called Lisp strongly typed for 40+
years, and COBOL people have called Lisp weakly typed for just as long.
I've always had more sympathy with the Lisp view of that, but I believe a
majority of groups still mean all of:

+ types are explicitly declared at compile-time

+ compilers refuse to compile type-incorrect programs

+ runtime tricks cannot subvert compile-time type guarantees

when they say "strongly typed".


(*) There isn't unaniminity among Lispers either, of course.  For example,
the STELLA language:

    http://www.isi.edu/isd/LOOM/Stella/documentation/manual.html

works its judgment into its name:  "STELLA stands for Strongly-TypEd,
Lisp-like LAnguage".  However, they don't include "explicitly declared" in
their meaning of strongly typed, allowing that when type inference can
deduce a declaration, an explicit declaration isn't needed.  That view
wouldn't    raise any eyebrows in the functional-language world, since type
inference is common there and practioners know it doesn't make a lick of
difference.

Type systems are complex and highly varied across languages, and two-word
catch phrases aren't really very useful.  To the extent that they can be, I
think the Tunes page on the topic draws useful distinctions without gross
over-simplification (so it's not a one-sentence thing, so it will never be
popular <wink/sigh>):

    http://cliki.tunes.org/Type%20System






More information about the Python-list mailing list