Kinda unwrap Optionals
TL;DR: You can add custom logic to optionals.
Optionals. Sometimes it is a little bit ugly to force unwrap things.
You know there is a value.
You add a
But then things change and your code breaks.
So in case you need to gracefully handle this, you add
a.maybeVal ?? "".
Much better, but possibly a lot to read when used in combination with other operations.
But swift gives us protocols. 🎉 So wouldn`t it be nice to (maybe) have another option …