Thanks!

>   #macro(zip_or_unzip) alt {
>     case ([[x, ...], [y, ...]]) { [[x, y], ...]] }
>     case ([[xx, yy], ...])     { [[xx, ...], [yy, ...]] }
>   }
>
> I know, it's more verbose, but (a) it doesn't repeat itself, (b) it re-uses
> an existing construct rather than create a new one.

I think I prefer the current syntax because punning on `alt` would
confuse syntax and ordinary values. (also, the current syntax doesn't
create any new constructs; macros just overload the array literal
syntax) However, I have to admit that the presence of `{}` makes the
`alt` version easier to read. Hm...

Paul
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to