|
|
|
|
|
by avgcorrection
1488 days ago
|
|
> I'm trying to [sass] out how sane languages represent sql null in a way that can't go wrong. There is a difference between a type Pointer where `null` is an instance of that type and a type Box which only has valid (can be dereferenced) values. If the language has e.g. algebraic data types and pattern matching then Option(al)<Box> can be safely matched on and Box can be used in the branch (the pattern match arm) where Some(Box). Meanwhile in a language with Pointer and no flow analysis any dereference of Pointer could lead to some kind of "panic". Say "unwrap()" all you want but the two approaches are clearly very different. |
|