Header Image

The totalitarian ideology of state governance

We consider case classes and sealed traits to be Scala’s answers to product and coproduct types. But they’re not the only possible answer, and they come with their own choices: product types are ordered and indexed by labels, and coproducts are unordered and predefined.

Totalitarian is an experimental library which offers alternative type-level representations of products and coproducts in alternative forms: unordered products and coproducts, whose elements are indexed by a type, and which may be composed into ad-hoc combinations, without defining new classes.

These features open up a variety of new programming techniques in Scala, many of which facilitate and encourage the use of total functions. By eliminating partiality from our code with Totalitarian’s product and coproduct types, we can take advantage of Scala’s type system to help us write safer, more reliable code.

This talk will cover the basics of Totalitarian, how to use it, how it works, and where the experimental library may be going next.

November 24 @ 09:00

09:00

– 09:50

(50′)

Auditorium

Jon Pretty