This comment told about inability to make variable number of new identifiers in macros:
You can't create new idents because of hygiene, so expanding generic functions is kind of impossible
Is it a good idea to have a sort of $x:gensym
thing, like this:
macro_rules! qqq {
[ $( $x:ident $t:gensym),* ] => { $( let $t = $x; )*; }
}
qqq!{ foo, bar};
?
$x:gensym
should work like $x:ident
, but without user actually specifying anything in that place, like a non-consuming regular expression part. Compiler should generate a random unique identifier name for this instead.