040: Phantom Builder Pattern episode artwork

EPISODE · Sep 27, 2021 · 1H 5M

040: Phantom Builder Pattern

from Elm Radio · host Dillon Kearns

Phantom types (happens at compile time, not runtime)Helps avoid things like adding centimeters and inchesianmackenzie/elm-unitsJoël Quenneville's phantom types talk from Elm in the Spring A Number by Any Other NameExtensible recordsBuilder patternJeroen's Hierarchy of Constraintselm-graphql SelectionSet scope type variableBuilder Pattern episodeBrian Hicks' builder pattern talk Robot Buttons from Marswith functionsPhantom builder is a state machine for your typeselm-review Rule API uses phantom builderPhantom types discourse post on time package Simon HertebySnapshot test in Elm review for expected error messagesPhantom Builder live stream episodePossible operations with phantom extensible buildersAdd a new fieldRemove a fieldChange the type of a fieldRemove the previously existing phantom type and change it to an empty record (not extensible, just a hardcoded return type) i.e. ReplaceWhat you can do with phantom builderRequire something to be always calledForbid something being called more than onceCause other constraints dynamically after calling somethingMake function calls mutually exclusiveEnable a function only if another one has been called

Jeroen introduces the phantom builder pattern and how it enables new guarantees in Elm API design.

NOW PLAYING

040: Phantom Builder Pattern

0:00 1:05:51

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Frequently Asked Questions

How long is this episode of Elm Radio?

This episode is 1 hour and 5 minutes long.

When was this Elm Radio episode published?

This episode was published on September 27, 2021.

What is this episode about?

Phantom types (happens at compile time, not runtime)Helps avoid things like adding centimeters and inchesianmackenzie/elm-unitsJoël Quenneville's phantom types talk from Elm in the Spring A Number by Any Other NameExtensible recordsBuilder...

Can I download this Elm Radio episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!