I think Allowing "empty" values, and not allowing Null would be better.
If SQL had Option (Maybe) branch matching it would be an interesting replacement, and then coalesce would not be needed.
SELECT id, MATCH k WITH ( SOME(k) THEN k, NONE THEN default, END) AS something FROM ...
Just spitballing for fun on what it might look like.
I think Allowing "empty" values, and not allowing Null would be better.
If SQL had Option (Maybe) branch matching it would be an interesting replacement, and then coalesce would not be needed.
I can see it's terse, and it is just a wrapper around data that would be stored like NULL but it kind of makes for interesting semantics.Just spitballing for fun on what it might look like.