We don’t currently have a syntax to efficiently do it. One syntax to do it is [[A] [A]; [A] [A]]. In principle, this can be optimized in the parser to be efficient too.
This is almost always wrong for a general purpose/expression-like macro. It’ll fail when the expression becomes more complicated (e.g. if you have ?:). Note that if you don’t care about the performance that much, you should just use [[A] [A]; [A] [A]] syntax. It has a high probability of becoming the syntax for this unless someone propose a different one.
Ah OK, thanks for the tip. Putting aside whether the macro is a good idea (it turns out I actually just need hvnocat function, not the macro), to implement this macro would you suggest working on the original expression? that is, converting Expr(:vcat,Expr(:row,A,A),Expr(:row,A,A)) to an hvnocat call directly?
I can give a “bad” different syntax in the hopes someone proposes a good one:
[A A,
A A]
that is, mimic vcat where ; indicates concatination while , indicates nocat.
I don’t like this proposal because [A A] indicates hcat, so I’d say the natural interpretation of the proposal is to only concatenate in the horizontal direction. So what’s missing is an alternative to a space to indicate hnocat.