4 ms·
> 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
by 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.)