Could we syntactically eliminate the ()/{}/[] after “calling” an unparameterized macro? In other words:
macro_rules! foo {
() => { ... }
}
could be invoked with foo! rather than foo!(). The motivation is primarily to avoid a paper cut.
I can imagine a few use cases that would become more ergonomic:
let my_vec = vec!; // vec![]`
println!; // println!()
ok! // Maybe shorthand for Ok(()) -- just an idea ?
I don’t see any obvious syntactic ambiguities that arise, and the change is purely syntactic, so the only part of the compiler that changes is the parser, I think.
Any thoughts?