A Pragmatic Case for Static Typing

Joel Goldstick joel.goldstick at gmail.com
Mon Sep 2 21:36:40 EDT 2013


On Mon, Sep 2, 2013 at 9:10 PM, Nobody <nobody at nowhere.com> wrote:
> On Mon, 02 Sep 2013 09:44:20 +0000, Steven D'Aprano wrote:
>
>> 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.
>
> Not if the language has type inference (e.g. Haskell, or C++ templates).
>
> --
> http://mail.python.org/mailman/listinfo/python-list

My personal reason for working with python (dynamic typing) as opposed
to Java or C++ is that (in general) I don't like company environments
that use Java or C++.  Its the world of huge software teams.  Python
seems to be more in vogue in smaller environments which suit my
interests.  I used to write in C and a little C++ back in the Borland
C++ days (90s?).  I'm not familiar with Haskell, except having heard
the name, but I also know it isn't as popular in the job market as say
python or ruby or C++ or Java.

So, while I'm off topic, sometimes the reason to choose one
methodology over another has to do less with the merits than on other
factors.  That said, python 'feels' extremely right to me.  Having
come from PHP for the last dozen years that shouldn't surprise anyone!

-- 
Joel Goldstick
http://joelgoldstick.com



More information about the Python-list mailing list