Hacker News new | ask | show | jobs
by elevader 1588 days ago
I'm not sure about this. Maybe the example is way too simple but, as the author stated, this can be easily done with already established patterns in Elixir so I don't really see the point/benefit of this. If you want to learn more about working in a Haskell-style there is always Haskell (as is said at the end of the article).

But it is a well written article and easy to follow, so I guess it achieves its goals.

1 comments

Hi!

Thanks for the comment, it's not the first time I read this feedback. Perhaps it was a misplay: I wanted to make the first article as accessible and short as possible so I chose something that already exists in Elixir and tried to point out the fact that this generalizes over what you can do with with in Elixir. But I definitely should have also included stuff that goes further.

Will definitely try to do something more awesome next time, sorry!

--Author

I think this is akin to the general problem people face when trying to convey why Haskell (or a Haskell-like library) is useful/awesome to them to a target audience that isn't already familiar with the subject. Simple and straightforward examples struggle to show any benefits that generalizations could/would provide. Complex examples are hard to explain without loosing most of the audience in terminology they don't understand. Or they just go on for way too long because they constantly drift off into explanations that don't really move the overarching subject forward.
> Simple and straightforward examples struggle to show any benefits that generalizations could/would provide.

Using Haskell you can use do-notation (with lists, Maybe and Either) as a simple example that should show the user the advantage of generic monads. (Just don't show them the problems with composability of monads or 'do-notation considered harmful' ;).