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

This gets brought up often, but side-by-side comparisons don't really work, because the languages are too different for them to be meaningful for anything but trivial expressions. To really understand Haskell, you need to somewhat unlearn Java - or at least, stop thinking in it (in terms of objects, state and method calling).

I think a good approach to thinking differently is to look how data structures are done - most programmers recognize arrays, lists, stacks and queues, but might be confused as to how you would implement such thing without side effects. A great resource to explain this is Okasaki's Purely Functional Data Structures[1], although it doesn't use Haskell at all, the ideas are relevant, and you can work through all of the examples implementing Haskell equivalents.

[1]:https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf



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

Search: