A Purist's Guide to Type-Driven Design

Make invalid states unrepresentable

A gopher dressed in holy robes, radiating light

In July 2023, I had the pleasure of presenting A Purist's Guide to Type-Driven Design in Go to 150 fellow gophers at London Gophers. They were kind enough to record the talk, which you can watch below.

In this 30-minute session, you'll learn how to use the Go type system to make invalid states unrepresentable. That means fewer production bugs, vastly improved testability, and a more enjoyable development experience.

Along the way, I'll show you the full extent of the Go type system's capabilities and, importantly, its limitations. With type-driven design, knowing when to stop is just as important and knowing where to start.

The video is accompanied by an extensive example repo split across five branches, corresponding to the major sections of the talk. You can also peruse the slides at your leisure.

If you have questions or are interested in hearing more about how type-driven development can help your team, please get in touch!