Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Online Course

Functional Program Design in Scala

École Polytechnique Fédérale de Lausanne via Coursera

Overview

In this course you will learn how to apply the functional programming style in the design of larger applications. You'll get to know important new functional programming concepts, from lazy evaluation to structuring your libraries using monads. We'll work on larger and more involved examples, from state space exploration to random testing to discrete circuit simulators. You’ll also learn some best practices on how to write good Scala code in the real world.

Several parts of this course deal with the question how functional programming interacts with mutable state. We will explore the consequences of combining functions and state. We will also look at purely functional alternatives to mutable state, using infinite data structures or functional reactive programming.

Learning Outcomes. By the end of this course you will be able to:

- recognize and apply design principles of functional programs,
- design functional libraries and their APIs,
- competently combine functions and state in one program,
- understand reasoning techniques for programs that combine
functions and state,
- write simple functional reactive applications.

Recommended background: You should have at least one year programming experience. Proficiency with Java or C# is ideal, but experience with other languages such as C/C++, Python, Javascript or Ruby is also sufficient. You should have some familiarity using the command line. This course is intended to be taken after Functional Programming Principles in Scala: https://www.coursera.org/learn/progfun1.

Syllabus

For Expressions and Monads
-We'll start by revisiting some concepts that we have learned from Principles of Functional Programming in Scala; collections, pattern matching, and functions. We'll then touch on for-comprehensions, a powerful way in Scala to traverse a list, process it, and return a new list. We'll see how to do queries with for-comprehensions as well as how the for-comprehension is "desugared" into calls to higher-order functions by the Scala compiler. Finally, we'll discuss what monads are, and how to verify that the monad laws are satisfied for a number of examples.

Lazy Evaluation
-This week we'll revisit performance issues caused by combinatorial search, and we'll discover an important concept in functional programming that can these issues: laziness. We'll also learn a little bit about proofs on trees; in particular, we'll see how to extend structural induction to trees.

Type-Directed Programming
-This week, we’ll learn how to make the compiler write programs for us! We’ll see how the compiler can summon program fragments based on their type and how this mechanism can be used to implement a new form of polymorphism (type classes).

Functions and State
-This week, we'll learn about state and side-effects. Through a rich example, we'll learn programming patterns for managing state in larger programs. We'll also learn about for-loops and while-loops in Scala.

Timely Effects
-This week we'll learn a number of important programming patterns via examples, starting with the observer pattern, and then going on to functional reactive programming.

Taught by

Martin Odersky, Erik Meijer and Roland Kuhn

Related Courses

Reviews

4.5 rating, based on 40 reviews

Start your review of Functional Program Design in Scala

  • Anonymous

    Anonymous completed this course.

    Heed the warnings that you must be an experienced Scala programmer to do well in this class (I am a very experienced imperative programmer in several languages). I took the "beginning" class, but even that was challenging and I didn't complete...
  • Mark Wilbur

    Mark Wilbur completed this course.

    This course is the follow-up to the same institution’s FP/Scala course. As before the presentation is great and the problems are hard. I ended up getting derailed by the second homework assignment, though. It involved a simulation of a circuit. Circuits might be common knowledge to Prof Oderskey, but I would have had an easier time modeling something I was more familiar with.
  • Johan Rylander completed this course, spending 10 hours a week on it and found the course difficulty to be medium.

    Slightly disorganized course. Very good though. Maybe the subject is just broad. There are multiple presenters. Anyways, I do recommend it and I did finish it which I would not have done if it was not good enough (for me).
  • Anonymous

    Anonymous completed this course.

    Challenging but intesting course. It's a good follow-up to "Functional Programming Principles in Scala"
  • Anonymous

    Anonymous completed this course.

    Not yet finished and not as good as "Introduction to Functional Programming in Scala" by Odersky, this course is anyway well done, explanations are generally clear and content is challenging but well presented. The only negative point is that the test rater does not provide clear feedback. It has been told that it's up to the student to write his own tests.. maybe a side course on scalatest and scalaunit would be a good idea for thise who do not have experience. And even in this case, if I fail a test and do not know why the feedback is not that useful.
  • Profile image for Luiz Cunha
    Luiz Cunha

    Luiz Cunha completed this course, spending 7 hours a week on it and found the course difficulty to be hard.

    2nd Course of the Specialization " Functional Programming In Scala": a level below in clarity and quality from the first one
    This is a top course for anyone interesting in Functional Programming and/or Scala
    (+) subject, videos contents
    (+) engaging delivery by Prof. Oberski
    (+) good and challenging assignments
    (-) the Course seems to reuse older MOOC material from a previously defunct MOOC, without updating the material: logic seems a touch broker
    (-) MOOC needs a refresh
  • Antoine Hugueney completed this course, spending 20 hours a week on it and found the course difficulty to be hard.

    The "simple, yet rigorous" teaching methodology prevalent at the EPFL is once more at work. Is it time for you too to get acquainted with asynchronous and distributed systems in a more systematic way? Let's call it Reactive. Functional ReactiveProgramming. Reactive Streams. Reactive design patterns through the Akka actor library.
    The challenge is real - and the results follow the principle "the greater the challenge, the greater the reward".
  • Anonymous

    Anonymous completed this course.

    The course started well, but I would have added 2 more weeks to the existing 4 weeks. There was a lot more that they could have covered, especially with regards to reactive programming.
  • Anonymous

    Anonymous completed this course.

    The course started well, but I would have added 2 more weeks to the existing 4 weeks. There was a lot more that they could have covered, especially with regards to reactive programming.
  • Anonymous

    Anonymous is taking this course right now.

    IT IS NOT FREE. Nor is the material for the course free.
    Its 50 USD a month which is really expensive. I cant believe coursera changed this. Updates in coursera made the course worse
  • Laurence Cabenda

    Laurence Cabenda completed this course.

    I really enjoyed working myself through this class exploring concurrent reactive techniques using the Scala language. "It's hitting two flies with one blow"
  • Anonymous

    Anonymous completed this course.

    This is an excellent class, however, it covers advanced material. A certain amount of tenacity is required to finish it.
  • Anonymous

    Anonymous completed this course.

    Fantastic course. If you want to learn more about modern programming concepts you should take it.
  • Anonymous

    Anonymous completed this course.

    Challenging, but with lots of "Aha" moments and a sense of accomplishment
  • Anonymous

    Anonymous completed this course.

    Challenging but satisfactory, mind opening. Really worth the time and effort.
  • Chris C completed this course.

  • Kuronosuke

    Kuronosuke is taking this course right now.

  • Vlad Podgurschi completed this course, spending 18 hours a week on it and found the course difficulty to be hard.

  • Ivan Vyshnevskyi

    Ivan Vyshnevskyi completed this course.

  • Guanxichen is taking this course right now.

Never stop learning Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free