No More Nulls
Subject: Enumerated (enum
) types, pattern matching, and meaningful return types.
Today’s episode discusses, in order:
enum
s in C and in Rust.switch
blocks in C-like languages.Option
and Result
enumerated types with pattern matching to provide meaningful returns from functions safely.There is a specific order to the examples below, and it is not the automatically-alphabetized order rendered by rustdoc
. Instead, you should work through in the sequence they appear in the source:
📆 2015-10-12 04:24 / ⌛ 00:17:12
📆 2015-10-03 22:04 / ⌛ 00:17:06
📆 2015-09-25 01:14 / ⌛ 00:17:11