128 points · by bontoJR · 11y ago · 25 comments
The reactions are overwhelmingly positive. Just make sure to leave a nice comment.
Your monad section looks solid, although now I undestand them I can no longer tell if a tutorial is good or not :-)
I love it. I mean I could have done the same thing in node. But there's something about the workflow in Haskell. I need to add a new feature I didn't think of. But I don't have to refactor as aggressively because all my code is made up of little functions. I start hacking, my editor has a list of errors I still need to clean up. I clean them up, and it usually works the first try.
Or this morning I wanted to add a connection pool to my rethinkdb driver code. The resource-pool package gives you an awesome way to do it for anything. Without knowing about rethinkdb at all.
Also this morning I wanted to do some IO in parallel. I found several nice concurrency packages and threw one in without any refactoring.
It has its difficulties (deployment?) but I'm really enjoying it.
A few months ago, I needed to retrieve JSON data from a list containing dozens of URLs. Fortunately, the "async" package handles this beautifully: [2]
pages <- mapConcurrently getURL ["url1", "url2", "url3",...]
Once you learn the basic concepts of Haskell and get over the hump, you’re able do things with ease that would otherwise take many years to master in C++ [3]. Even the most advanced features of the language follow the same underlying principles & syntax.My advice to those wanting to learn Haskell is simply not to give up. Keep coming back to it. Practice. Read other’s code. Over time, things will begin to click. And once they do, you’ll wonder why you struggled so much in the first place.
[1] https://www.fpcomplete.com/school/starting-with-haskell/libr...
[2] https://hackage.haskell.org/package/async-2.0.2/docs/Control...
[3] http://chimera.labs.oreilly.com/books/1230000000929/index.ht...
Anything specific? What kind of environments are you deploying in?
But I still have ghci installed at work, and I find it surprisingly useful to use Haskell to prototype (pure) functions for Scala! This is something I truly didn't see coming, but now I often find myself starting ghci when I want to see if some combination of folds or maps works the way I think it should, and for some reason it feels way more convenient than trying it in Scala.