[Python-ideas] [Wild Idea] Static Ducks

Masklinn masklinn at masklinn.net
Mon Sep 21 14:47:07 CEST 2009


On 21 Sep 2009, at 14:27 , Nick Coghlan wrote:
> ilya wrote:
>> I tried to read most of the thread, but I'm still not sure about the
>> exact meaning of the proposal. Here is how I understand it.
>>
>> There are two ways to add strong typing to the language. One is  
>> called
>> "static typing", and it's done before you generate a bytecode,
>> another, "dynamic/run-time typing" is done at run-time.
>
> Python already has strong dynamic typing. strong-vs-weak and
> static-vs-dynamic are orthogonal attributes of type systems.
The first part is usually considered true, the second part is more  
difficult to handle. The issue being that "strong typing/weak typing"  
isn't formally defined at all, an people tend to make "their own"  
definition of it to fit their preconceptions: a few years ago, Mark- 
Jason Dominus found (at least) 8 different definitions of the concept  
( http://groups.google.com/group/comp.lang.perl.moderated/tree/browse_frm/thread/e2e153d2ad7380c5/73d99bd8d5d16d8a?rnum=1&_done=%2Fgroup%2Fcomp.lang.perl.moderated%2Fbrowse_frm%2Fthread%2Fe2e153d2ad7380c5%2F73d99bd8d5d16d8a%3Ftvc%3D1%26#doc_89b5f256ea7bfadb 
  ) and B.C.Pierce [TAPL] gave up on the subject altogether after a  
pair of weeks of research. The mere idea of talking about "strong  
typing" without precisely defining what you mean by that is therefore  
bound to fail (as for one person Tcl will be strongly typed, meanwhile  
for another one anything falling short of *ML or Haskell is weakly  
typed).

The static/dynamic typing axis is better defined (though there's a lot  
of blurring, it's a continuous path rather than a binary proposition).



More information about the Python-ideas mailing list