The fact that parts of the design space (e.g. hygiene) are still nebulous while we are stabilizing other parts is a bit worrying. While everything is unstable, we can play around to our hearts’ content, but once we stabilize something, remaining design choices are forced to work around it.
Personally, I see hygiene as a major part of macros in rust, and I feel like we should be really reluctant to release macros 1.2 without it. As much as I want macros 2.0 to be available, I also want it to be a clean, polished, and mostly-complete feature set when it is released, as I’m sure all of us do (especially those who worked so hard to build it ). This all leads to the next thing:
IMHO, there are a couple things that make it hard to contribute to macros currently:
- Things seem to have kind of bypassed the normal RFC process. The original Macros 2.0 RFC was probably the vaguest RFC I’ve ever seen. It basically says “we will do a macros 2.0 of some sort” and that’s all. I am not really aware of any public discussion of the design issues and the design space.
- In fact, I’m not even aware of what the design issues are…
- As a result, I am not aware of any list of unresolved questions, design points that were rejected and why, etc…
- So it’s hard to know what exactly needs doing/polishing…
- Documentation is sparse. There are only a hand-full of people TMK who actually know how macro expansion works in the compiler and fewer still who know how hygiene, proc-macros, custom-derive, and other magical systems really work and fit together.
Personally, I would really like to see a full-blown macros 2.0 RFC which details exactly what features macros 2.0 has, what changes to the compiler are necessary (and of course, as I mentioned before, it would be great to get content in the guide about how macros work under the hood), and what the stages of stabilization should be.
I’m sorry if this comes off as a rant. I really do appreciate all of the work that has gone into making this work, but I feel like there is an unusual lack of transparency and clarity around what exactly macros 2.0 should contain, which naturally makes me feel nervous about any macros 1.2…