Currently, we have that @foo a, b, c parses as @foo((a, b, c)) which seems sensible enough, but it's a major source of frustration when you have a macro inside a function's arguments. As a concrete example, consider a very simple underscore anonymous function macro that would take @_ f(_) + 1 and turn it into x -> f(x) + 1. With the current parsing of macros, if we write
this gets parsed as
rather than the desired
I'm wondering if anyone has a feeling for how disruptive it would be to change this in 2.0 and if they feel that such a change would be desirable. I'm not sure I've ever seen someone write @foo a, b, c where they didn't intend it to mean (@foo(a), b, c), but this could be a reflection of my ignorance.
Is there some deep and useful reason for the current behaviour that I'm missing?
Currently, we have that
@foo a, b, cparses as@foo((a, b, c))which seems sensible enough, but it's a major source of frustration when you have a macro inside a function's arguments. As a concrete example, consider a very simple underscore anonymous function macro that would take@_ f(_) + 1and turn it intox -> f(x) + 1. With the current parsing of macros, if we writethis gets parsed as
rather than the desired
I'm wondering if anyone has a feeling for how disruptive it would be to change this in 2.0 and if they feel that such a change would be desirable. I'm not sure I've ever seen someone write
@foo a, b, cwhere they didn't intend it to mean(@foo(a), b, c), but this could be a reflection of my ignorance.Is there some deep and useful reason for the current behaviour that I'm missing?