What Programming Languages Should You Learn Next?

Donn Cave donn at u.washington.edu
Thu Mar 20 15:38:49 EDT 2008


In article <7xskynm4m8.fsf at ruckus.brouhaha.com>,
 Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:

...
> I think it's easier to write complex code in Haskell because:
> 
>   1) it has a powerful static type system that lets you express
> important invariants and have them enforced at compile time.  This not
> only catches errors but helps you understand the program logic almost
> like running the code under a debugger does.  If you try to fill a gap
> by putting in a piece of the wrong shape, it just won't fit and the
> compiler will tell you what you really wanted.  On the other hand,
> most types are inferred by the compiler, so you don't need a lot of
> cumbersome declarations like in Java.

Worth repeating.

One of the perhaps surprising consequences, Haskell code can
be very easy to modify.  I've been fooling around with computer
programs for a couple decades, and I'm just getting used to the
idea that I can casually rewrite Haskell code and get the compiler
to find what I missed.  I have come to feel that the indiscipline
of dynamic typing in languages like Python leads to an intuitively
surprising rigidity.  Ten years ago I would cheerfully accept this,
given the meager and clumsy support for static typing in languages
like C++, but today, it makes me appreciate Haskell's potential
for complex projects.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list