A modest `missing`s 2.0 proposal

I think there’s really only one clear solution here: the ecosystem that wants to believe like SQL and offer seamless automatic lifting everywhere needs to be based upon macros that lower down to code with explicit lifting. It’s not a coincidence that almost all of the code in Volcanito is focused on this kind of expression-level rewriting.

Julia doesn’t let you say:

For all f, f(::Missing) = missing

But that’s not such a big deal: it’s fairly trivial to to produce something like this with macros: replace all syntactic calls with the relevant branch. And there are parts of Julia (like short-circuiting Boolean operators) that will just never work unless you use macros because they can’t be extended at all.

4 Likes