4 ms·
The approach to hygiene seems very lazy and short sighted as proposed. Given python's culture, I think that the macro system should be designed such that using
by slaymaker1907 6y ago
The approach to hygiene seems very lazy and short sighted as proposed. Given python's culture, I think that the macro system should be designed such that using macros is as easy as possible even if that adds complexity to writing them. Therefore, I wish that we could have real hygiene since it helps give better error messages.
I do think that there should be ways to break hygiene, but hygiene should be the default. I've also found that breaking hygiene is almost always unnecessary when you combine it with a feature like syntax-parameters in Racket.
Maybe it would even make sense to initially limit macros to something like syntax-case which enforces hygiene with later plans to add in more complex macros which can break hygiene.
Finally, for those who think that macros are impossible to debug, I challenge you to check out Racket's macro debugger which allows you to see each macro individually get expanded.