0:00 / 0:00
Fun(c) 2018.7: John De Goes - FP to the Max
Fun(c)tional Programming Group
1.4K subscribers • 1 video on Hallway
- Recommended by 3 people: 3 in engineering communities.
- Presented by John De Goes
- An opinion. It argues one side of a question engineers disagree on.
Advanced. Deep dive for people who know the field.
37K views8 years ago3 recommendations
Programming languagesSoftware designScalaFunctional programmingRefactoring and legacy code
John De Goes incrementally refactors a procedural program into a purely functional Scala application, demonstrating the benefits and costs of pure FP.
What happens when you take a procedural program riddled with partial functions and effects, and incrementally refactor it to a purely functional program—and then dial it up to eleven? In this live coding session, John hopes you'll be amused and a maybe little terrified as he shows you where pure FP leads on one of the simplest programs possible, pointing out both the benefits and the costs of pure functional programming, and giving you an appreciation for how functional programming techniques scale to and deliver the most benefit in very large teams and very large applications. Code: gist.github.com/jdegoes/1b43f43e2d1e845201de853815ab3cb9 Web: tiny.cc/Func Twitter: @fun_c_ Hosted by Expedia Group, Inc. "We are the World’s Travel Platform. Bringing the world within reach" Expedia Group is hiring (see lifeatexpedia.com)Why it's here
3 people recommend thisWhat people say. Highly recommended as a classic demonstration of refactoring procedural code into pure functional programming.
u/leet92in r/functionalprogramming • Recommends
Best examples of medium scale, real-world FP projects?
My overall goal is to understand how to translate large-scale OOP systems to an FP paradigm. A couple useful examples I’ve encountered so far are the following:
https://github.com/pauljamescleary/scala-pet-store
[video
My gripe is that in the first example, there are no complicated interactions among concepts - it's basically just CRUD on 4 isolated resources of different types (User, Pet, Order, ....). As for the second, it's a little too small of a program to extrapolate the techniques to bigger projects. It shows you how to abstract over context very well, but the data structures aren’t very complex, not like what you'd see…