3 ms·
Will this be a good book to learn your first functional language?
by nafizh 7y ago
Will this be a good book to learn your first functional language?
- lihaoyi 7y agoYes! We use a lot of functional techniques in this book, but we do not dwell on them. In the end you will be using functional techniques not because they’re interesting, but because they’re the obvious and easy. That is how functional programming should be!
- throwaway_pdp09 7y agoFunctional programming is a style or pattern. If a language gives you basic stuff, you can do that pattern. I learned a bit of haskell a long time ago - mind blown kind of time - then found javascript had closures (erm, kind of a way of turning functions into objects-with-state-that-still-look-like-functions) and functions as first class objects (meaning a function can be passed around exactly like and integer or a string) and so I used it in javascript. Google up "javascript functional" and see what happens. Do some exercises. Beware there are libraries out there that make simple functional Jscript stuff look entirely unnecessarily complicated. And when you're ready, pick up this guy's book! Edit: that may have come across a bit insulting towards the author. All I'm saying is you can learn the functional stuff while you wait for the book to come out. And when you have the functional stuff under your belt, get the book and you'll be one large step better prepared to dive into it - scala has a lot more to offer than just functional programming, and the book will surely cover a lot of ground.
- codygman 7y ago> Functional programming is a style or pattern. If a language gives you basic stuff, you can do that pattern. Kind of... correctness isn't as guaranteed though. Having a hard time putting it into words at the moment, maybe I just need some holes poked into it to draw out the rest of my view (or change it).
- jim-jim-jim 7y agoRegardless of how good a book may be, I think Scala itself might prove to be a challenging language to learn FP through. I use it daily at work and definitely appreciate all its strengths, but I don't think I'd ever really understand it if I hadn't studied Haskell first. I'd recommend it as a second language, after you've been bitten by the bug and want a job writing functional code.