3 ms·
I'm talking of the syntax. Why can't I write a macro in more rust-like form for example instead of a very different language
by baby 8y ago
I'm talking of the syntax. Why can't I write a macro in more rust-like form for example instead of a very different language
- steveklabnik 8y agoWell, patterns are a very different language than rust; rust has no way to express “one or more of this thing” for example. I wasn’t involved when the syntax was chosen, and that was well before our RFC process, so I don’t have any real, deep explanation for you, sorry!
- mamcx 8y agoIn fact thinking about the same, and because I'm building a toy language, a macro system could look like: https://elixir-lang.org/getting-started/meta/macros.html https://elixir-lang.org/getting-started/meta/macros.html