Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting started with Functional Programming...

chris webster
Posts: 2407
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought it might be helpful to bring together some of the resources we have found so far for people just starting out with functional programming (and thanks to JK Robbins for prompting this). If any of you come across any other useful material for FP newbies, please add a post in this thread to share it with the rest of us.

Functional programming in general

  • Functional Programming For The Rest Of Us: an intelligent informal introduction to FP for people who know a bit about regular (imperative) programming but are new to FP, with examples based on Java. It was written by Slava Akhmechet on his now dormant blog, which has a number of other interesting FP-related articles.
  • Functional Thinking articles by Neal Ford at IBM DeveloperWorks. Series of articles looking at different aspects of FP, illustrated through Java and Groovy.
  • Structure and Interpretation Of Computer Programs by Abelson, Sussman, and Sussman: This free online book is the companion to the famous Abelson and Sussman SICP lectures at MIT from the 1980s onward, which are also available as videos online. The SICP course was an introductory course for Computer Science students at MIT and contains a lot of fundamental CS and FP ideas, illustrated via the functional programming language Scheme (a variety of Lisp). Although the course no longer runs at MIT in this form, similar courses are still taught based on the same material elsewhere e.g. CS61A at Berkely, and the ideas are still very relevant, especially to those of us learning FP.
  • Simple Made Easy talk by Rich Hickey (author of the Clojure language). An entertaining introduction to the contrast between "simple" and "easy", suggesting good reasons why a functional approach to software development might be a good idea.
  • Functional Thinking talk by Neal Ford from the Strange Loop conference (2011) introduces some key concepts in functional programming via examples in Java and suggests how to approach solving problems in a functional manner.
  • Coursera is running a free online course on Programming Languages from 14 January 2013, which aims to introduce students to functional programming via ML and Racket (a Lisp dialect based on Scheme) as well as Ruby, an object-oriented language which supports some functional features. Looks interesting - and you get to learn Emacs as well (not sure if that counts as a threat or a promise...).

  • Lisp and Haskell

    These are two of the classic "pure" FP languages so anything you learn about these ought to be transferable to other functional languages.

  • Learn You A Haskell For Great Good - free online version of the book by Miran Lipovaca, an entertaining but through introduction to functional programming with Haskell.
  • Real World Haskell - free online version of the book by Bryan O'Sullivan, Don Stewart, and John Goerzen. The authors aim to "show you how to use functional programming and Haskell to solve realistic problems. This is a hands-on book: every chapter contains dozens of code samples, and many contain complete applications."
  • Haskell front-end language features keynote talk from London Haskell Exchange 2012 by Simon Peyton-Jones, a major contributor to the design of Haskell and the Glasgow Haskell Compiler. He is an enthusiastic and entertaining speaker, oddly reminiscent of Monty Python's Michael Palin.
  • Practical Common Lisp - online edition of the 2005 book by Peter Seibel (Apress).
  • The Nature Of Lisp - another interesting article from Slava Akhmechet's blog
  • Beating The Averages article by Paul Graham (2003) describing how using Lisp for his start-up company gave them a competitive edge over companies using more conventional languages.

  • Functional programming on the JVM with Scala and Clojure

    Clojure is an implementation of Lisp on the JVM, so it is functional and not object-oriented, while Scala is a functional programming language that is also object-oriented. Check out the JavaRanch Scala and Clojure forums for language-specific questions and information.

    Coursera offers an excellent free online course on Functional Programming Principles in Scala by Martin Odersky, the guy who invented Scala. The course ran in 2012 and the next presentation has not yet been announced, but the materials are still online.

    You might also want to look at The Well-Grounded Java Developer book, which includes a set of tutorials on polyglot programming i.e. mixing FP in Scala or Clojure with conventional Java code.

    And why not go for broke and learn Seven Languages In Seven Weeks? OK, we all know you can't really learn a language in a week, but this book will give you a great introduction to a range of interesting languages, including functional languages such as Haskell, Scala, Clojure and Erlang.

    Bill Clar
    Ranch Hand
    Posts: 163
    Eclipse IDE Java Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Thank you for compiling such an extensive list. I'm reading "Functional Programming For The Rest of Us" and the benefits it provides sound too good to be true.

    Hopefully Coursera's Scala course is renewed for 2013.
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic