Title: Refactoring an http Request Into a State Machine Using Elm's Union Types

Robert Bethencourt

Robert Bethencourt

Target Audience: Some prior knowledge needed

Elm is a functional programming language that compiles to JavaScript, and is an absolute joy to develop with. It uses a Redux like global state management pattern called The Elm Architecture to build single page applications. Elm also comes out of the box with much of what you'd expect from a functional programming language. It's got curried and higher-order functions, immutability and a static and strong type system. Elm's robust type system will be the main focus of this talk. We're going to use Elm's union types to refactor an http request so that our user interface is less prone to bugs and easier to reason about. It would be best to have some familiarity with Elm and The Elm Architecture, or stateless functional components in React combined with Redux, but if not, as long as you've coded an http request before you'll at least get a high level understanding, even if the syntax is foreign.

Back