4 ms·
> It makes macro invocation feel "wrong" or "special" in a subtle way and betrays a lack of confidence in the macro system But a macro invocation is special.
by the_mitsuhiko 12y ago
> It makes macro invocation feel "wrong" or "special" in a subtle way and betrays a lack of confidence in the macro system
But a macro invocation is special. The syntax within a macro does not follow Rust rules, so if macros would not be marked properly it would be incredibly confusing for a user. Let alone that macro imports are different by the very nature of their behavior.
- eddyb 12y agoNot to mention it would be difficult, if not impossible, to parse in the first place (the contents of a macro invocation are stored as token trees within macro AST nodes, within the regular AST).
- kybernetikos 12y agoI think that the 'call-by-name' behaviour in Scala is confusing, because you can write something that you think will execute once but actually, it might execute multiple times and there's no obvious marker that it's special. When you have something that is potentially major, you generally don't want it to be invisible.