5 ms·
Tbh, i now look at optionals as another colour when i read this https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuff
by secretsatan 3y ago
Tbh, i now look at optionals as another colour when i read this https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
You return an optional with no reason, it colours all subsequent calls.
When i was younger, i thought of them as an extension of bool, yes/no/maybe, but now, was it cancelled? Did an error occur? Did it just timed out? How many cpu cycles am i wasting throughout my code because every thing down the line checks it for null? It snowballs