Why does Dynamic Typing really matter?!?

Cameron Laird claird at lairds.com
Thu Feb 6 09:53:40 EST 2003


In article <3E4269DD.96286B67 at engcorp.com>,
Peter Hansen  <peter at engcorp.com> wrote:
>Jason Smith wrote:
>> 
>> I'm doing some research into language constructs, particularly dynamic
>> typing.  What I'm looking for are examples in dynamically typed
>> languages that clearly illustrate the benefits that dynamic typing
>> give to a solution to a problem.  I'm aware that dynamic typing
>> provides the following,
>
>Oh, believe me, it provides much more than that!  ;-)
>
>> But what I want need is an solution to a problem that would not be
>> possible to replicate in a statically typed language...
>
>Although I wouldn't claim that there is NOT such a thing, I'm also
>not sure that the existence of solutions which cannot be replicated
>with statically typed languages is at all biggest benefit of a
>dynamically typed language.
>
>For me, Python provides as a result of its dynamic typing, much 
>higher productivity as I simply don't spend time worrying about 
>punching the keys that produce all that static typing information
>for the compiler to use to tell me where I need a type case or
>something like that.
>
>Python also makes life simpler when I can provide an object which
>has the necessary "interface" (in the sense of supporting the
>method that will be called on it in the context in which I'm using)
>without actually having to be derived from a specific parent class
>or interface (i.e. with the necessity of providing all kinds of
>methods which aren't needed in the context in question).  
>
>This is extremely useful for automated testing, such as is used in
>Extreme Programming so heavily, especially for providing mock
>objects to decouple sections of the system during testing.  For
>this reason alone, I think dynamically typed languages are often
>more productive by a long shot in an XP environment than any
>statically typed languages.
>
>-Peter

All true, of course.  I'll dramatize this in what strikes me
as Maoist rhetoric:  we support dynamic typing not to change
types, but to ignore types.  Types are a false overdetermin-
ation, as, at an earlier time and at a lower level, memory
addresses were.  Memory and type management are just two of
several functions best left to the computer, so that coders
can concentrate on application-level concepts.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html




More information about the Python-list mailing list