Skip to content
0:00 / 0:00

#zio#typeclasses#functionalprogramming

John De Goes is Programming Without Type Classes

Berlin Functional Programming Group

2K subscribers • 9 videos on Hallway

YouTube
  • Recommended by 2 people: 2 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.

6.9K views5 years ago2 recommendations

Programming languagesSoftware designScalaFunctional programmingDesign patterns

John De Goes discusses the trade-offs of type classes and presents an alternative approach to building functional components without them.

Type classes have become a cornerstone of statically-typed functional programming, powering abstractions like monoid and monad. Yet, type classes often have generalized names, which don’t reflect their purpose in specific domains; and they incur higher learning costs, especially when emulated in languages without them. In this presentation, John De Goes discusses the pros and cons of using type classes, and presents a systematic method for building powerful functional components that do not require type classes. Attendees will learn how to preserve the benefits of principled, algebraic functional programming, without forcing type classes on coworkers or users. A mathematician by training but a software engineer by vocation, John A. De Goes has been professionally writing software for more than 25 years. John has contributed to dozens of open source projects written in functional programming languages, including ZIO, a library for asynchronous and concurrent programming in functional Scala. In addition to speaking at Strata, OSCON, BigData TechCon, NEScala, ScalaWorld, Scala IO, flatMap, Scalar Conf, LambdaConf, and many other conferences, John also published a variety of books on programming. Currently, John heads Ziverge Inc, a company committed to solving hard business problems using the power of functional programming. This virtual talk was brought to you by the Berlin Functional Programming Group. Join us on Meetup: meetup.com/Berlin-Functional-Programming-Group/ Follow us on Twitter: twitter.com/BerlinFPGroup Buy a T-shirt: teespring.com/berlin-fp-group Support us on Patreon: patreon.com/bfpg

Why it's here

2 people recommend this

What people say. Highly recommended for understanding the architectural philosophy and design goals behind the ZIO ecosystem.

u/ResidentAppointment5in r/scala • Recommends

On “Zio / Zionomicon : is it worth it ?”

If I may try to answer as judiciously as possible: The ZIO ecosystem is built around some pretty specific goals that I think John De Goes does a great job elucidating here. I'll try to summarize it as "Scala-native functional programming using inheritance and subtyping, avoiding higher-kinded types, and avoiding an encoding of typeclasses." A secondary aspect is the `ZIO` type itself, which essentially combines what you might think of as `MonadError` and `Kleisli` from Cats, with `Either` and `IO` as the concrete instances of them. That is, it explicitly represents the notion of an "environment" that is depended on, an "error type" they make a big deal out of not being rooted in `Throwabl…

u/ResidentAppointment5in r/scala • Recommends

On “Why Typelevel hates ZIO?”

Let me recommend watching Programming Without Type Classes. IMO, /u/jdegoes does a characteristically excellent job of explaining the goals, and therefore the architecture, of the ZIO ecosystem. In particular, he lays out some information about how the ZIO ecosystem strives to retain the reasoning ability those of us in the Typelevel ecosystem appreciate about the type classes we've come to know and love (or know and loathe...) while also retaining the ZIO ecosystem's distinctive "pure FP the native Scala way" and what I'll loosely call its "batteries included" philosophy, by which I mostly mean that the actual `ZIO` type constructor combines aspects of what, in the Typelevel ecosystem, we…

u/thinkharderdevin r/scala • Recommends

On “Scala at Scale at Databricks”

That's a fair criticism, but I would just say that there are other less category-theory heavy ways to do pure FP. I would check out ZIO. It provides pure FP effects but without higher-kinded types, typeclasses or tagless final and with better (imho) type inference and discoverability. Check out this talk [video for a longer explanation of the principles of ZIO in this respect. Disclaimer: I am a ZIO contributor. If you are interested, we're always happy to help out newcomers on the ZIO discord (https://discord.gg/dyT3s7cM) !