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.
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.
-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.
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.
-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. We'll learn how latency can be modeled as an effect, and how latency can be handled with Scala's monadic futures. We'll learn the important combinators on futures as well as how they can be composed to build up rich and responsive services.
Johancompleted 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).
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 the later assignments (I did complete them after the class ended). The lectures only cover the basics, but the assignments go into details and do cover the essentials quite well. The best resource was the "Reactive Cheat Sheet" that was mainly put together by advanced students (thank you, thank you). Even then, I didn't complete any o…
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 the later assignments (I did complete them after the class ended). The lectures only cover the basics, but the assignments go into details and do cover the essentials quite well. The best resource was the "Reactive Cheat Sheet" that was mainly put together by advanced students (thank you, thank you). Even then, I didn't complete any of the assignments. I persevered because my goal became collecting a wide variety of resources to be understood later. The class forum grew to over 90 pages of just topics (I saved many of the discussion pages). Distributing applications on a "sea of processors" is the future of computing and tools for thread management are essential. This class goes a long way in providing this knowledge. Five stars for content.
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.
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.
Antoinecompleted 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".