Functional Programming in Scala



After 10 years of Object Orientated Java, 2 years of Functional Programming in Scala was enough to convince me that I could never switch back. But why? The answer is simple: Functional Scala lets you think less. It reduces the number of moving parts you need to hold in your head, lets you stay focussed and saves your mental stack from overflowing.

In this talk I’ll show you how to stop treating Scala as a better Java and start exploring the world of Functional Programming. I’ll use code examples to demonstrate a four step path that’ll let you ease yourself into the world of Functional Programming while continuing to deliver production quality code.

With each step we’ll learn a new technique, and understand how it leaves you with less to think about: Hopefully this talk will convince you that Functional Scala leads to code that’s easier to hold in your head, and leave you excited about learning a new paradigm.

Original talk title: Thinking Less with Scala

Talk by Daniel Sebban at Scalapeño. Check out his Medium page: https://medium.com/@daniel.sebban

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

source

This Post Has 22 Comments

  1. Ricky Nuyens

    If the inc function is handed the max value of int as its parameter, it should result in an exception as well … and therefore is not a pure function either

  2. Krishnadas PC

    Which scala framework you recommend for rest api development?

  3. Oscar

    Dude! You clearly don't know how much a really good devops earn!

  4. Oscar

    20:04 – yes the compiler works pretty heavily, that's why I bought the 32 core AMD, the compiler works faster! It is a pleasure really.

  5. Oscar

    This is a very good talk, I enjoyed it. But don't forget about stuff like this:

    class WithFilter[K, +V, +IterableCC[_], +CC[_, _] <: IterableOps[_, AnyConstr, _]](

    self: MapOps[K, V, CC, _] with IterableOps[(K, V), IterableCC, _],

    p: ((K, V)) => Boolean

    ) extends IterableOps.WithFilter[(K, V), IterableCC](self, p) with Serializable

  6. Zhenghao Huang

    Omg! This lecture just made me rethink what I’ve been doing for the past 12 years of my career.

    I’m going to start a new big data project real soon. Is this something that can be applied in such a project?

  7. Vrunda Shah

    File1 Code –

    class Abc {

    //code

    }

    File2 Code –

    Class Abc1 {

    var a:Abc = null

    try {

    a = new Abc()

    }

    }

    what does this line in file2 mean in scala "var a:Abc = null" where Abc is a class stored in file1

  8. Sebastian

    Lol, i would never inmagine to see a PRL timed (50s? 60s?) Gazzete page on a Scala turorial 🙂

  9. RollinCode

    scala community is like an alcoholics anonymous meeting

Leave a Reply