The advantage of hygienic macros is not one of language capability -- you can write macros that have good hygiene using gensym
and careful quoting/unquoting at the right times. However, hygienic macros ensure your macros have good hygiene. In that respect, it's a bit like type-checking.
There may also be tooling advantages to hygienic macros. Most hygienic macro systems impose tight controls on what your macro does and how it does it (e.g., you can't execute arbitrary code when a macro defined by Scheme's syntax-case
is expanded). This can make it easier to write programs that "understand" your macro and can provide additional tooling support.
On the other hand, there are some cases where unhygienic macros may be useful. For example, if you actually want to capture a binding for a specific variable (e.g., anaphoric macros) then I think you're out of luck if you only have hygienic macros.