[rust-dev] macro-by-example syntax

2011-07-26 Thread Noel Grandin
Hi Nice work on the macro-by-example stuff, I really like the concept. However, maybe the syntax could be improved? For example, with this one: #macro([#zip_or_unzip([[x, ...], [y, ...]]), [[x, y], ...]], [#zip_or_unzip([[xx, yy], ...]), [[xx, ...], [yy, ...]]]); I'm thinking

Re: [rust-dev] macro-by-example syntax

2011-07-26 Thread Paul Stansifer
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