Fork me on GitHub
#datascript
<
2022-05-23
>
Oliver George00:05:13

Heretical thought: would the world actually end if datascript supported nil values?

Oliver George00:05:07

Just that it's a niggle where other bits of the system don't carefully prune maps of nil values.

Niki08:05:55

Maybe not. But it’s not clear whether [?e :attr ?v] should match on [1 :attr nil], for example. Also I feel it’s a good thing to clear your data from nils in general

Oliver George23:05:56

I can see that NULL mattered for SQL databases. They didn't have the option of excluding a column when it wasn't set (so NULL implies not set). Datascript has more room to move here. I'd say your example should match (nil as value, not indicating "dunno"). (I apreciate this is somewhat academic, not pushing hard just playing out the idea)