I’m going to try to explain a technique called type-driven development.
It’s where we write as much code as possible using only types, deferring
any non-type details until later. We’ll see how it helps us as we develop a small service
that supports authentication.
Along the way we’ll see how we can use abstract types, the
??? method, and the Scala compiler itself to converge towards a good solution to our task.
Since type-driven development doesn’t sound very fun, I like to call it “Type Tetris”. How is programming with (only) types like Tetris?