A Pragmatic Case for Static Typing

Steven D'Aprano steve at pearwood.info
Mon Sep 2 05:44:20 EDT 2013


On Mon, 02 Sep 2013 01:10:34 -0700, Paul Rubin wrote:

> "Russ P." <Russ.Paielli at gmail.com> writes:
>> I just stumbled across this video and found it interesting:
>> http://vimeo.com/72870631
>> My apologies if it has been posted here already.
> 
> The slides for it are here, so I didn't bother watching the 1 hour
> video:
> 
>   http://gbaz.github.io/slides/hurt-statictyping-07-2013.pdf
> 
> I guess for Python programmers looking to expand their horizons a bit,
> it's worth at least looking at the slides.  But, it may overstate its
> case a little bit.  Haskell's type system is way cool but the language
> introduces other headaches into programming.

I haven't watched the video, but the slides are worth reading, although 
if you're familiar with this:

https://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/

there might not be anything new in it.

I think there is a lot to be said for advanced static-typed languages 
like Haskell, as opposed to "dumb" static-typed languages like C, Java, 
Pascal etc. 


One factor I don't see very often mentioned is that static typing 
increases coupling between distant parts of your code. If func() changes 
from returning int to MyInt, everything that calls func now needs to be 
modified to accept MyInt, no matter how similar MyInt is to int. You have 
to make changes just to satisfy the compiler.



-- 
Steven



More information about the Python-list mailing list