Approximating non-standard evaluation like in R, e.g. for plot labels

I agree with your argument about automatic axis labels. I’d point out that one big challenge with grabbing expressions as arguments via macros is that the expressions have already gone through a lossy pass from concrete syntax tree to abstract syntax tree, so they don’t faithfully reproduce the user’s input.

julia> String(Symbol(:(x + y))) == String(Symbol(:(x+y)))
true

I think the value of something like @curve is just that it removes the need to think about making a function. In simple cases this isn’t enough of a gain, but if you’re writing 20 anonymous functions in a row (as you might to define a complex query against a stream of tuples), the value builds up.

2 Likes