Parentheses in a macro invocation

question
#1

Suppose I have a macro that is called like

@mac a, b, c = d

(for a concrete example, think of Parameters.@unpack).

What is the proper way of writing this with the () invocation form, ie how to complete

@mac(a, ...)

?

0 Likes

#2

@mac( (a, b, c = d) )… I mean, you have one argument and that is the whole tuple expression. You can of course write your macro as something like @mac(a, b, c = d) but then you take 3 arguments and have to change the macro body.

1 Like