> Isn't your productivity gain coming from using a statically typed language rather than Haskell specifically
I think it's a bit more than that, Haskell has a much more sophisticated type system than quite a few of the popular statically typed langauges ( C, Java, C# ). Static typing is only the start, to be really useful we need modern type inference methods and a concise way of expressing generics. Both Scala and Haskell do this very well.
It depends on what you mean by statically typed language. If you mean other stuff like SML/Ocaml, I agree. If you include C/C++/Java/C# in your definition "statically typed", then I beg to differ. I have considerable experience in C, Java and, to a lesser extent, C++. And all in all I consider their type systems worthless for error prevention, the flexibility of python gains you more than their type systems do.
In this sense I suspect the OP would say the same about any ML-like static type system, but not many other static type systems.
Re:School of Haskell Goes Beta
by mightybyte on Friday February 01, 2013 @12:15AM
(#5149335)
Purity is a big factor too, and Haskell is the only pure language I know of that is mature enough for production use.
in though statically typed meant C++ or Java, and probably it does.. i never felt compelled to the way they do typing, so i gravitated towards Ruby and Python.
but to me Haskell is a different league.. Haskell-typing actually helps /me/, where i feel C++/Java-typing merely help the compiler.
Re:School of Haskell Goes Beta
by codewright on Friday February 01, 2013 @04:39AM
(#5149994)
Are we still spreading that canard where type errors are somehow some kind of bugbear in Python?
It's not a profound part of writing code in Python for anybody that's spent more than a few weeks with it.
A profound part? Maybe not. However, I noticed yesterday that a provisioning tool I wrote was blowing because I was assigning by mistake an empty string coming from a CSV instead of a None value to an integer field in an sqlalchemy model. That's a bug a static type system would have found.
Almost every exception a Python program ever throws is or can be made a type error (or otherwise statically caught) in Haskell and similar languages. A type error is not the same thing as a TypeError.
When someone dumps a large Python codebase on you, it is significantly harder to figure out how it works than with a statically typed program, since it is harder to figure out what types to use and are returned by any given function call.
Isn't your productivity gain coming from using a statically typed language rather than Haskell specifically? It feels like any statically typed language is a leg up from Python :)