Skip to content
0:00 / 0:00

#scala#functionalprogramming#effects

scale.bythebay.io: Rob Norris, Functional Programming with Effects

FunctionalTV

10K subscribers • 19 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Rob Norris, Gemini Observatory

Beginner. No background in the topic needed.

13K views8 years ago1 recommendation

Programming languagesSoftware designScalaFunctional programming

Rob Norris explains the difference between effects and side-effects in functional programming and how to work with them.

This talk video is a node in devreal.ai, the developer community graph. It connects to: Talk: Functional Programming with Effects — devreal.ai/t/171117-functional-programming-effects-scale-by-… Interview: scale.bythebay.io: Rob Norris Interview — devreal.ai/t/2017m11-scale-bythebay-io-rob-norris-interview-… Speaker: Rob Norris — devreal.ai/n/rob-norris Company: Gemini Observatory — devreal.ai/c/gemini-observatory Event: Scale by the Bay — devreal.ai/e/171115-scale-by-the-bay-conference Explore these connections and related videos, photos, speakers’ blogs and podcasts, and other By the Bay networks. ----- Effects are good, but side-effects are bad. Well, ok. What's the difference? What do we mean when we talk about effects, and what are the rules of the game? In this beginner/intermediate talk we will talk about some familiar effects like `Option` and `List`, build up some more interesting effects of our own, and talk about how to think about programs as "computations" that are values we can manipulate like any other kind of data. Along the way we will do some equational reasoning and talk about applicative and traversable functors, monads, and other intimidating words.

Why it's here

1 person recommends this

What people say. Recommended as a clear introduction to what effects are in functional programming.

u/Migeilin r/scala • Recommends

So... what is an effect? Some context: I'm a Java programmer, but I don't like it. I have a background in mathematics so naturally I am interested in (pure) functional programming. At my dayjob, I have expressed my feelings towards Java and expressed I would like to do something more "mathematically motivated" and coined Scala and their effect systems as examples. My teamlead, who himself is a developer, wanted me to give him a bit more of an explanation of what I meant by this, so I set out to gather some information I can present to him. But I am confused as to how I can unite the following two descriptions of effects: * Rob Norris in his talk 'Functional Programming with Effects' ta…

u/kailuowangin r/scala • Mentions

On “Any good examples of using cats?”

…composition, isolate side effects, reduce boilerplate, managing mutable states without mutable variables, etc. This is rather a big topic. I wrote a blog post https://tech.iheart.com/why-fp-its-the-composition-f585d17b01d3 mainly focused on the composition aspect of it. Rob Norris gave a somewhat overlapping but more broad talk on FP with effects: link to this video If you get interested in this topic, you can find more comprehensive resources on Cats' website here https://typelevel.org/cats/resources_for_learners.html 3. Cats use powerful tool called type class, you can find more about it, again on Cats website. https://typelevel.org/cats/typeclasses.html. For a custom monadic type `CMT_`, you woul…

u/tpolecatTypelevelin r/scala • Mentions

On “Are Monads popular in Scala?”

Monad is a useful idea because it defines *very precisely* what it means to compose functions that compute effectful values. This ends up being useful because it lets us recover a lot of the expressiveness we seem to give up when we start doing FP. I gave a talk on this a few weeks ago. You can do monadic computations with concrete data types in any language; but to abstract over them and have any chance of getting everything to line up correctly you need higher-kinded types, and as practical matter you need some kind of machinery for passing arguments implicitly. Very few languages let you do this.

u/ShanShrewin r/typescript • Mentions

On “rustic - a TypeScript library providing Rust's Option and Result types”

Sorry got too different points I was trying to make mixed up. Its true you can't model all effects in Typescript. Its not true this limits you from implementing any of those data structures All monads are indeed for effects, call them data structures if you want but its purely semantics they are monads, yes its a word that leads to the fp community getting up on its high-horse but its the correct terminology. This isn't ancient knowledge that I discovered on my own infact its knowledge the Scala and Haskell communities taught me infact personally I've contributed nothing to the fp community other than being a practitioner. **Rob Norris** talking about why and how monads model effects (…