• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting started with Functional Programming...

 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 defmacro.org 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 defmacro.org 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.

     
    Ranch Hand
    Posts: 163
    Eclipse IDE Tomcat Server Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Chris,

    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.
     
    Ranch Hand
    Posts: 4716
    9
    Scala Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks for the links chris. It was just what I needed right now.
     
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Cow.
     
    Randall Twede
    Ranch Hand
    Posts: 4716
    9
    Scala Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Cow? I can't see how many you have right now. I guess it's a couple hundred more than me. What does cow mean?
     
    Bear Bibeault
    Sheriff
    Posts: 67746
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Click on the word cow in my post.
     
    Author
    Posts: 161
    31
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I don't know if self promotion is appropriate, but since my own book has been presented twice on JavaRanch, I feel free to mention it:

    Functional Programming in Java

    The book is based essentially upon exercises that do not exceed 10 lines (often less) and are to be solved by the reader before running provided unit tests to check the result.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic