Has someone suggested the idea of adding Pattern Synonyms in Rust?
Given a type like:
struct Type<'a>(&'static str, &'a [Type<'a>]);
You can think a Rust-like syntax like:
pattern Int = Type("Int", &);
pattern Arrow(t1, t2) = Type("->", &[t1, t2]);
pattern Foo = 1 | 2 | 7;
Usable as shorthand for patterns in match{}.
How much often do you wish to use such synonyms?
This idea is related but different from Active Patterns of F# language: