I’m in general a huge fan of Julia AST’s. But there’s a few changes I’d make if I could:
Line numbers would not be separate arguments to begin blocks. Instead, there would be a
:numbered_line head which takes two arguments: a line number and a line. See NumberedLines.jl for a prototype.
Julia would able to use
:parameters not matter what argument order it appears in the AST. Moving it to the front by default doesn’t make to much intuitive sense to me.
Type fields would not be in a begin block, because they aren’t evaluated like a block of code.
In an expression like this:
(args...; kwargs...) -> map(args...; kwargs), the first pair of args, kwargs wouldn’t be put into a begin block for the same reason as above.