News for hackers. Stuff that matters.
Re:Functors, applicatives, and monads in pictures by chii on Sunday May 19, 2013 @12:56AM (#5731860)
> They chose a deliberately over-simplified example in order to demonstrate the core concepts;

i wish people who are writing guides on these topics pick a non-simplified situation where using this method makes for an easier program (vs using the "traditional method"). The comparison and contrasting of a functional/monadic approach vs a procedural approach in a complex scenario might actually shed more light - at least, for some one who is familiar with the procedural approach.

Re:Functors, applicatives, and monads in pictures by balloot on Sunday May 19, 2013 @01:03AM (#5731888)
I would love to see this! One of the fundamental issues I have with functional languages is every example I see is basically "See this thing that's relatively simple and uncomplicated in Ruby/PHP/C/whatever? Here's how to do that in Haskell!" And the Haskell version ends up being extremely unintuitive and complicated. Bottom line is I still don't know for which situations functional languages are a "good" tool.
Re:Functors, applicatives, and monads in pictures by gizmo686 on Sunday May 19, 2013 @01:29AM (#5731951)
I think the problem is that the Haskell version is actually very simple, to the person writing it. Its a classical problem of teaching, it is extremly easy to forget how something looks to new people.
Re:Functors, applicatives, and monads in pictures by egonschiele on Monday May 20, 2013 @01:03AM (#5736004)
Again, if you tell me where you're stumbling, I can fix it. I see your complaints all over this post and you haven't responded to me once.
Re:Functors, applicatives, and monads in pictures by nandemo on Sunday May 19, 2013 @10:03AM (#5732863)
That approach is used at length in Real World Haskell. For example, some code for key-value lookup is shown that deals with a series of Maybe foo values, first with a cascade of guards (think a cascade of if-else's), and later with monad syntax. There are other examples.

http://book.realworldhaskell.org/read/programming-with-monad...

Re:Functors, applicatives, and monads in pictures by lobster_johnson on Sunday May 19, 2013 @09:05PM (#5735231)
I enjoyed RWH much more after having learned a lot of the basics. It starts off simple, to be sure, but then quickly jumps into the deep end. For a book that's about real-world stuff it gets into a lot of unnecessary detail, too, that should have been deferred until later "advanced" chapters. I appreciated the hands-on approach to real examples, though.

"Learn You A Haskell For Great Good" [1], while much less complete, is the best intro I have found so far. It's also free.

[1] http://learnyouahaskell.com/