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

École Polytechnique Fédérale de Lausanne

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 Scala 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. Finally, you will learn how to leverage the ability of the compiler to infer values from types. 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. 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 with 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 address 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

Reviews

4.5 rating, based on 40 Class Central reviews

4.5 rating at Coursera based on 3132 ratings

Start your review of Functional Program Design in Scala

  • Anonymous
    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 comp…
  • Mark Wilbur
    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.
  • 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
    Challenging but intesting course. It's a good follow-up to "Functional Programming Principles in Scala"
  • Anonymous
    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
    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
  • 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
    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
    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
    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
    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
    This is an excellent class, however, it covers advanced material. A certain amount of tenacity is required to finish it.
  • Anonymous
    Fantastic course. If you want to learn more about modern programming concepts you should take it.
  • Anonymous
    Challenging, but with lots of "Aha" moments and a sense of accomplishment
  • Anonymous
    Challenging but satisfactory, mind opening. Really worth the time and effort.
  • Kuronosuke
  • Vlad Podgurschi
  • Ivan Vyshnevskyi
  • Guanxichen

Never Stop Learning.

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

Someone learning on their laptop while sitting on the floor.