Re:ICFP report on the use of Haskell at Google
by silentbicycle on Thursday September 30, 2010 @01:07AM
(#1742350)
I think many programmers find it hard because experience with Algol-derived languages give them bad assumptions - they expect all of the conceptual baggage of mandatory stack allocation, so recursion seems ludicrous and complicated.
Recursive cases in languages with tail-call optimization are like inductive reasoning in mathematics - "How long is a list? If it's empty, zero, otherwise one (for the head) plus however long the rest is."
Re:ICFP report on the use of Haskell at Google
by jemfinch on Wednesday September 29, 2010 @09:09PM
(#1741847)
Chalk me up as someone who disagrees. Personally, I find recursive transformations of immutable structures far easier to reason about than iterative modifications to mutable structures.
At least in some cases, I think that's the expected result: consider the difficulty of reversing a singly linked list in-place and reversing it applicatively.
Re:ICFP report on the use of Haskell at Google
by chromatic on Wednesday September 29, 2010 @09:32PM
(#1741902)
Perhaps the difficulty is in designing the appropriate data structures and identifying the correct transformation functions. In other words, designing a good FP program is difficult just like designing a good OO program is difficult.
Re:ICFP report on the use of Haskell at Google
by edifice on Wednesday September 29, 2010 @09:47PM
(#1741938)
It definitely depends on the algorithm. It also depends on the language. A lot of the difficulty of learning Haskell, for example, is in the type system. A dynamically typed FP lang like Clojure has a shallower learning curve.
Re:ICFP report on the use of Haskell at Google
by iustin on Wednesday September 29, 2010 @11:30PM
(#1742169)
It is true, but it's also unfortunate—I think a lot of Haskell's strengths come from its type system. So what makes Haskell worth learning also makes it hard to learn Haskell :)
Re:ICFP report on the use of Haskell at Google
by silentbicycle on Thursday September 30, 2010 @01:14AM
(#1742359)
Haskell's type system is unfortunate, because for most programmers, 80+% of the benefit comes from how it utterly nails the basics (checking variant type coverage in pattern matching, typeclasses), but the language community is focused on the cutting edge top .003%, because that's where the research papers are.
Re:ICFP report on the use of Haskell at Google
by strait on Thursday September 30, 2010 @02:57AM
(#1742516)
After working through a few of my own Haskell projects, I eventually found the type system disappointing. A better design would have made it even more sophisticated and harder to learn, IMO. That's the price to pay for being purely functional. Instead, I felt that certain design trade-offs were made, which in effect, make the type system awkward and tend to lead to inflexibility in writing ambitious, comprehensive programs.
Re:ICFP report on the use of Haskell at Google
by silentbicycle on Thursday September 30, 2010 @08:52AM
(#1743082)
Any examples you care to share?
Re:ICFP report on the use of Haskell at Google
by nickik on Thursday September 30, 2010 @03:15AM
(#1742544)
Iit's also unfortunate - I think a lot of Clojure's strengths come from its macro system. So what makes Clojure worth learning also makes it hard to learn Clojure :)
There is stuff to learn in every language :)
Re:ICFP report on the use of Haskell at Google
by nickik on Thursday September 30, 2010 @03:10AM
(#1742534)
He i think you are write but that is where the Language can help you. You don't have do the recursion every time by hand. You can have language constructs that are just as easy as normal loops but work like recursion in the compiler. If you really need to do the recursion you would have to do so in imperativ languages to.
(Node: I don't no haskell)
Doubtless others will disagree though. Maybe we don't all have the same mental strengths and weaknesses.