3 ms·
The first time I ran into this, I was working on an application that tracks delivery trucks. I wondered how - and why - the hell the truck got to the ocean near
by FredPret 3y ago
The first time I ran into this, I was working on an application that tracks delivery trucks. I wondered how - and why - the hell the truck got to the ocean near Nigeria.
It's important to output null / None instead of zero if you don't have any data!
- richbell 3y ago> It's important to output null / None instead of zero if you don't have any data! This is one of my gripes with Go, it's hard to express none vs default value. With languages like Kotlin you can either do `null` or created a sealed class (sum-type like) that has to be explicitly checked for the sentinel value. (Yes, you can use pointers, but that isn't exactly ergonomic.)