On Wednesday, April 20, 2016 at 8:58:35 AM UTC-4, Didier Verna wrote:
>
>
>   What's the rationale behind this particular way of invoking macros 
>   (the @ character) ?


It's nice for both humans (it's obvious that there could be some 
non-standard evaluation semantics or other such funniness) and the parser 
(it knows exactly which symbols it needs to resolve in order to expand the 
macros since nothing else can contain the @ character).
 

> And why a single macro concept for two different 
>   things (with or without arguments) ? 
>

Are you talking about the optional parentheses?  That is: `@m(x,y)` vs `@m 
x y`?  It's very convenient to have the parentheses-less version for macros 
like @inline and @simd which annotate or transform existing structures. 
 And parentheses with comma-separated arguments can be nice in cases where 
the distinction between several arguments might get fuzzy otherwise.

On Wednesday, April 20, 2016 at 9:19:03 AM UTC-4, Didier Verna wrote:
>
>  Also, I'm wondering about the use of RETURN in all the one-liner 
>     macro examples from the manual.


Yup, implicit return works for macros, too.  The manual makes it explicit 
to emphasize the function-like syntax transformation (as opposed to 
CPP-like textual substitution). 

Reply via email to