I’ve been using this in ChainMap for a while, inspired by hadley’s non-standard evalutation paradigm.
Imagine a function
function binary(a, b, c) Expr(:call, b, a, c) end
I’ve been using a macro called
@nonstandard to generate the code below automatically:
@nonstandard binary # expands to macro binary(es...) binary(es...) end
Which means you could then do stuff like
[1, 2] == @binary 1 vcat 2
But it seems like you could skip the this whole process altogether, including the macro definition, simply by having
@binary simply always refer to the
All macros would be also available as standard evaluation functions. You could use them for mapping, reducing, etc.
(Less) macroexpand debugging!
More intuitive, at least for me.
Might require shuffling around the namespace. For example,
time both exist in Base, I think.