VegaLite.jl
VegaLite.jl copied to clipboard
Support julia 1.5 keyword argument syntax: interpret @vlplot(; x, y) as @vlplot(x=x, y=y)
As of https://github.com/JuliaLang/julia/issues/29333 julia 1.5 supports implicitly named keyword arguments, e.g. f(; x, y)
is interpreted as f(; x=x, y=y)
. It would be nice to support a similar syntax in the @vlplot
macro. I at least find myself typing something like @vlplot(:line, width=width, height=height, x=x, y=y)
quite often when writing functions that compose a custom spec for which I want to expose some properties as method arguments.
We just need to be a bit careful how that interacts with our existing positional arguments. But maybe just allowing this after a semicolon would be one option.