Torsten Bronger <[EMAIL PROTECTED]> writes: > > Re Haskell: I've been spending a lot of time on Haskell recently, > > though I haven't done anything nontrivial with it yet (just some > > small stuff). But I think it's better for complex program > > development than Python is, > > Could you elaborate on this? (Sincere question; I have almost no > idea of Haskell.)
http://wiki.python.org/moin/PythonVsHaskell is a fairly high-level comparison. 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. 2) The basic list type in Haskell works something like Python iterators, but they don't change state when you consume an item. In fact all Haskell data is immutable. You avoid vast classes of bugs this way. But you do have to change the way you think about programming. I may write a longer comparison post sometime later. -- http://mail.python.org/mailman/listinfo/python-list