Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What Do You Mean, a Some or a None?

The Bridgekeeper stands at his post. One more traveller approaches.

“What… is the airspeed velocity of an unladen Option?”

The Lykn developer tilts her head. “What do you mean — a Some or a None?”

The Bridgekeeper opens his mouth. Closes it. Opens it again.

“I… I don’t know that.”

He is cast into the Gorge.

It turns out the Bridgekeeper’s question was non-exhaustive. He asked about Option without specifying which variant. The compiler would have caught that. The Gorge, less forgiving than the compiler, does not provide error messages.

The developer crosses the bridge. On the other side: objects, arrays, strings, modules, and the rest of a language that, from this point forward, has pattern matching. Everything is different now.