Skip to content
0:00 / 0:00

#shapeless#genericprogramming#typeclasses

The Type Astronaut's Guide to Shapeless—Dave Gurnell

Scala World

5.9K subscribers • 13 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Dave Gurnell

Intermediate. Assumes working knowledge.

10K views9 years ago2 recommendations

Programming languagesSoftware designScalaFunctional programming

Dave Gurnell introduces Shapeless, a library for generic programming in Scala, explaining generic representations, isomorphisms, and type class derivation.

This workshop is an introduction to shapeless, a library for generic programming in Scala. It is aimed at developers with little to no experience with shapeless. However, attendees should be confident with Scala and have a rough working knowledge of algebraic data types and type classes. We will introduce the main concepts used by shapeless, including generic representations, isomorphisms, and dependent and singleton types. We will then demonstrate programming techniques to abstract over types and eliminate boilerplate, paying special attention to one of shapeless' most exciting uses: automatic derivation of type class instances. Along the way, we will touch on the ways shapeless is being used in some of Scala's most ground-breaking open source projects, including Circe, Doobie, Ensime, Finch, frameless, parboiled2, and scodec.

Why it's here

2 people recommend this

What people say. Recommended to help teams overcome anxiety and learn the standard way of doing generic programming in Scala.

u/know_not_muchin r/scala • Recommends

(Apr 7, 2017) The Type Astronaut's Guide to Shapeless—Dave Gurnell

u/tpolecatTypelevelin r/scala • Recommends

On “More minimal alternative to shapeless?”

Not to sound glib, but I recommend educating your team. Shapeless uses techniques that may be unfamiliar to you, but it's not magical and shouldn't be scary. It's the standard way to do these things in Scala. I suggest you check out Dave Gurnell's free book and his Scala World talk which might help your team overcome some anxiety.