top | item 42647573

(no title)

duncan-donuts | 1 year ago

Introducing “unknown” feels like another kind of hell like undefined in JavaScript.

discuss

order

jampekka|1 year ago

JavaScript's undefined is great. It's sort of similar to a maybe monad. Or IEEE 754 NaN. JS could have nicer mechanisms to handle undefined though.

demurgos|1 year ago

Just to clarify, I'm not advocating to introduce a new `unknown` keyword. I'm saying that the existing `null` in SQL was not named properly and that the name `unknown` would have been more fitting. SQL's `null` already has the semantics of `unknown` as explained in the part of the article that I quoted.

wvenable|1 year ago

SQL's use of "null" is probably one of the oldest instances of that concept in computing. It's exactly equivalent to unknown. That is its definition.