[Haskell] Re: [Haskell-cafe] Why functional programming matters

Michael Reid kid.meier at gmail.com
Fri Jan 25 08:22:14 EST 2008

Yaakov Nemoy wrote:

> I'm still very much a newbie, but the one thing that struck me as the
> best feature coming from Python is the static typing.  Changing the
> type of a function in Python will lead to strange runtime errors that
> take some work to debug, whereas, when I tinker with a program in
> Haskell, I already know it will work once it compiles.

I'm quite new to Haskell as well and I must echo this sentiment. The 
mainstream has somewhat realized that its a waste of time to tell the 
compiler the type of _everything_. Learning Haskell has completely 
reversed my feeling that static typing is an old outdated idea. The 
power of Haskell's type system makes it feel like you are programming in 
a dynamic language to some degree, yet all of it is type-checked, and 
that is just *really* cool.

Honestly, when I first started reading a Haskell tutorial I was 
convinced that it was an runtime-typed language like Python. When the 
tutorial moved on to explain that it is statically typed I could barely 
believe it.

The second thing I might want to highlight is the power of monads and 
other techniques like arrows and FRP.

Granted, these are not easy concepts to impart in a talk, but I think 
they were really an important discovery in FP as they deal with the 
"problem" of IO in such a beautifully orthogonal way. Following on that, 
more advanced structures like arrows and how all of this can contribute 
to really powerful DSLs I think is a pretty big selling point.

Actually, come to think of it, one great way to show off the language is 
to show off the power of some of the libraries that have been written. 
For example, show how easily a parser can  be created w/ Parsec; or show 
  an example of FRP w/ Yampa. These examples will likely tantalize the 
programmers in the audience to want to learn more.

Good luck!


More information about the Haskell mailing list