Laws for Free – Alistair Johnson
Channel: Typelevel
Date: 2018-06-23

Everyone that uses a functional programming library like cats is aware of the methods that each type class adds and also the properties that the methods need to abide by. But in practice, the properties are not always proved, rather testing that the methods behave as expected. This is a problem waiting to happen, as the algebraic properties are not “optional extras” – if your semigroup's combine is not associative ... then it ain't a semigroup, sorry! So in this talk we will quickly review what we mean by a property and a law and show how to use the cats laws that are available. We'll see that they are simple to use and add literally hundreds of scalacheck tests for free. And impress your boss as well, the tests can be “seen” on the screen!

* Event *

Typelevel Summit Berlin, May 2018: https://typelevel.org/event/2018-05-summit-berlin/

* About Speaker *

Alistair has been programming for far too long, for far too many companies, but is still passionate about promoting the integration of maths, science and engineering into everyday programming life.

* Licensing *

This recording is licensed under CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/).