Pre-RFC: allow macros become `println{...}` rather than `println!(...)`

Actually I'm not working for adding semantic case distinction.

Although keyword {} is ambiguous for both macro and struct constructor, compiler could resolve the role of this expression. The question is, human could not read it, in this case we could reuse the suggested semantic case distinction to ensure human readability.

Omit such rule would generate warnings, but no error is generated.

The only case generate an error is that, you wrote macro keyword before a struct constructor.

If you have a struct and a macro with the same name, you might wrote:

let v:Vec<i32>=Vec{iter}; // constructor
macro Vec{v}; // suppose we have a marco happened to named `Vec`

I'd like to use ¬ for not.

2 Likes

That's still a semantic difference, in that which namespace is checked first is determined by case.

Sadly this is hard to type on many keyboards.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.