Getting started

Adam Taylor ataylor at ucsd.edu
Fri Sep 27 15:55:51 EDT 2002


>>                      Statically typed   Dynamically typed   Untyped
>>Strongly checked      ML                 LISP
>>Weakly checked        C                                      Assembler
>
>I agree.  So where in this spacewould YOU put Python and Perl?

Python is in the same square as Lisp (which I mentioned).  So is Perl.
At least using this terminology... ;)

> I was translating his internal vocabulary to use the term we started
> with.  He defines "weakly checked" only in terms of "static checking".
> Since they're synonyms, this reference only supports a def of "weakly
> typed" in terms of static checked languages.  So I'm saying the
> reference does not help us nearly as much as I would like.

Okay, that's true, he does define weakly-checked only in terms of
statically checked languages, which I hadn't appreciated:

  In reality, certain statically checked languages do not ensure
  safety. That is, their set of forbidden errors does not include all
  untrapped errors. These languages can be euphemistically called
  _weakly checked_ (or _weakly typed_, in the literature) meaning that
  some unsafe operations are detected statically and some are not
  detected.

But the clear generalization of this (it seems to me) is to define
weakly checked languages as languages in which some unsafe operations
are detected and some are not detected.  In other words, just delete the
word "statically" from the last sentence in the quote above.

Of course, it doesn't sound like any existing languages are both
dynamically typed and weakly checked (and I can't think of any myself):

  Most untyped [read dynamically typed] languages are, by necessity,
  completely safe (e.g., LISP). Otherwise, programming would be too
  frustrating in the absence of both compile time and run time checks to
  protect against corruption.

Adam

-----
"James J. Besemer" <jb at cascade-sys.com> wrote in message news:<mailman.1033119160.31301.python-list at python.org>...
> Adam Taylor wrote:
> 
> >This sounds like the same thing as I said, or damn close.  Am I
> >missing something?
> >
> 
> Not really.  Just different emphasis.
> 
> >Yes.  It seems to me that Table 1 in Cardelli:
> >
> >          Typed   Untyped
> >Safe      ML      LISP
> >Unsafe    C       Assembler
> >
> >Might be better like this:
> >
> >          Statically typed   Dynamically typed    Untyped
> >Safe      ML                 LISP
> >Unsafe    C                                       Assembler
> >
> >(Python would also be in the (Safe,Dynamically typed) position.)
> >
> >Although safety and strongly-checked are not the same thing, this
> >table is also correct:
> >
> >                      Statically typed   Dynamically typed   Untyped
> >Strongly checked      ML                 LISP
> >Weakly checked        C                                      Assembler
> >
> 
> I agree.  So where in this spacewould YOU put Python and Perl?
> 
> >>A literal reading furthermore defines "weakly typed" only in 
> >>terms of static checking.
> >>    
> >>
> >
> >I don't understand what you mean by this.  Cardelli never uses the
> >term "weakly typed" himself, he only uses it that one time, to say
> >that it's the term most people use for the concept that he prefers to
> >call "weakly checked".
> >
> 
> I was translating his internal vocabulary to use the term we started 
> with.  He defines "weakly checked" only in terms of "static checking". 
>  Since they're synonyms, this reference only supports a def of "weakly 
> typed" in terms of static checked languages.  So I'm saying the 
> reference does not help us nearly as much as I would like.
> 
> >Or at
> >least when people start talking about "strongly typed" vs "weakly
> >typed" languages, that first thing to get straight is which axis
> >they're talking about.
> >
> Fair enough.  
> 
> --jb



More information about the Python-list mailing list