I learned, that you can provide a
default-value when accessing a dictionary using
subscript(_:default:). When there's no value assigned to the key, you get your
default-value back. And although I don't use enums with associated values very often, it was nice to be reminded about them.
At UIKonf 2020, Conrad Stoll gave an interesting talk about state driven development using enums in Swift, so one day, these associated values might come in pretty handy. Here're some sketchnotes of the talk.