3 ms·
I'm not a fan of Scala and I absolutely loath sbt, but I absolutely recommend the FP Coursera Functional Programming Principles course[1] that uses both of them
by dyadic 12y ago
I'm not a fan of Scala and I absolutely loath sbt, but I absolutely recommend the FP Coursera Functional Programming Principles course[1] that uses both of them.
There's an edition already running now but close to the end, however you can still join and work through it. Because it's an online course you'll find other people also working through it and, depending on where you're based, maybe some real world study groups as well.
I'd argue that the pain of downloading jars with JMV isn't that bad. Sure, it's a real pita to download them, but afterwards they're cached and immediately available. Also, if you're using Scala or Clojure then it's really easy to jump into the repl and start playing with the language.
If you're looking for "real world" fp then those may be your best bet. Haskell is a beautiful language and becoming a lot more real-world, especially compared to it's history and reputation as only an academic language. I'm not really a Haskell expert but I worked through Learn You a Haskell for Great Good [2] and found it to be one of the most enjoyable texts about a PL that I've ever found. You can read it all online for free or buy it in real-world book form.
As well as those I've worked through SICP in Racket (a lisp), SICP is a classic and well worth taking a look at even if you don't want to lisp.
I've written in all of the above with Emacs where there's great support, I'm sure there are vim equivalents of the language support, although I'll have to rely on some other HNer to point them out.
Finally, elements of FP are seeping through into non-fp languages, you can already see them in Java 8, C#, JS, Python, Ruby and more. No one can really call these languages FP languages, but if you know some of them then it might make jumping into FP seem a little less alien.
[1] https://www.coursera.org/course/progfun https://www.coursera.org/course/progfun
[2] http://learnyouahaskell.com/ http://learnyouahaskell.com/
- Senkwich 12y agoThanks for the comment! I wish this site let initial posts be more than 2000 characters so I could have gone into more detail. The main reason I am hesitant to work with Scala/SBT is because I've been using Docker to package/deploy a lot of the web applications I've written. Since Docker is a one-or-nothing for each line you execute, I am getting either all of the dependencies installed at once (which takes awhile the first time) or - if something fails - I get none of them. The caching that sbt offers is basically thrown out, which is really frustrating. There's that, but I also just don't like how much weight there seems to be with Scala because of all of the large jars I have to download to do anything. At least, that's what it feels like for me. So, I'm not sure what specific language you would recommend. You indicated that Scala/Clojure aren't too bad and offer repls to start playing, but how hard are they to really set up for a decent-sized project? One team that I'm working with has used Clojure for DSL-related work, but mostly use Java for their main application. Haskell is the language that I've been reading about recently that seems to have more "meat" available each year (from Hackage), which is encouraging. Everyone (including yourself!) claims that it is a beautiful language, and quite a few believe that learning Haskell - and I mean really learning it - has redefined how they approach software development. That kind of change is what I'm hoping to discover if I delve into a functional language in a big way. I'd forgotten that I had used DrRacket in academia at one point, but not enough to learn much of it. What exactly makes SICP a classic to you? As for other languages that are beginning to exude some functional... functionality, I've noticed that (with Java 8 and Ruby), but I'm afraid that I'm not really grasping the strengths of said features. I'm trying to jump into a more functional language to really understand why they can be good and hopefully take away something really meaningful. Thanks for the links! I'll check them out later today!