datascript

Oliver George 2022-05-23T00:14:13.216169Z

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

Oliver George 2022-05-23T00:15:07.387259Z

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

Niki 2022-05-23T08:05:55.472409Z

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 George 2022-05-23T23:50:56.717519Z

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)