4 ms·
Not really. What's a mess is having a single value NULL that means very different things in different contexts. For example, an unknown value is different from
by prmph 5y ago
Not really. What's a mess is having a single value NULL that means very different things in different contexts. For example, an unknown value is different from a missing value is different from an error value is different from an elided value. If you need to return all these kinds of values from a function, how would you distinguish between them?
- pdimitar 5y ago1. Don't have NULL at all 2. Have sum types 3. Have several useful kinds of them (like Option and Result) 4. Allow people to make their own to serve their specific scenario Basically Rust, Haskell, OCaml.
- tester756 5y agoI agree, Coherent NULL handling imo means also Result<T> / Optional<T>