Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a non-Haskell programmer, I didn't understand almost any of the examples. Some of them I understood, but didn't get what the feature is good for. Some of them I just plain didn't get (Haskell's syntax is to different from what I'm used to to easily understand what's going on).

I love the idea of this article, talking about specific features in your language you'd like to see gain wider adoption. It's too bad I had trouble understand what was going on.



(author here). This is good feedback. I definitely struggled with finding a good way to describe what each of the features does. I'm considering writing a sequence of followups, each focusing on a particular feature, trying to describe how (say) Java code could be refactored to take advantage of the feature.

I'd very much appreciate suggestions for things to address in such a series! Any time I write something like this, I always learn a lot in the ensuing discussions. Mostly I learn technical things, but it's good to learn more about the writing process as well.


Here's where I think the article goes wrong.

Firstly, I'm not sure what audience you had in mind when you wrote this. If it's Haskell programmer, then I think it's too detailed. If not, I think it's not detailed enough (but it does include all sorts of words/concepts a non-Haskell programmer won't understand).

I think a shorter article, focused on less features would have been better (or a series of articles). It feels to me like you could talk in length about each of these features, and the article is both too long because of so many features, but too short in each specific feature.

Finally and most importantly, what you're really missing is code examples in other languages. You mentioned doing this, and I agree 100%. That would make your article much easier for someone like me. Although I vote the examples be in Python :)

I'm looking forward to your next post!


Or make up some pseudo-code-y language. I.e. this is how it could look like in Java, if it included this awesome feature with some syntax I just made up for it.

(I like Python more in general, but I am not sure, if you can demonstrate some of the static goodness of Haskell-analogies in it. Polymorphism on return types is awesome, but not real imaginable in Python, but barely imaginable in Java.)


That's a shame. And I agree. I guess the author should provide translations in C or Java or whatever along with his examples as far as possible. I understand his Haskell examples, but that's preaching to the choir.

I read a blog post were somebody re-implemented some examples of Haskell concepts in C. I can't remember the URL, but searching for "Monads in C" or "Monads in Java" etc brings up some interesting posts. E.g. http://blog.tmorris.net/maybe-monad-in-java/




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: