Is sigil_H an example of a macro that is unhygienic?

After having let it simmer for a while, I think the biggest reason why read unhygienic is less of a problem, is because it will raise an error at compile-time, when the context of the macro doesn’t provide the implicitly read variable (is this always the case? I might be wrong here). So the implicitness becomes explicit, when you try to compile such code :slight_smile: It never gets to be compiled, luckily.

Whereas write unhygienic code can go unnoticed, which is a big problem, if you weren’t expecting that.

So this is what I get to:

hygienic > read hygienic (won’t compile if expectation about variable is not met) > write hygienic (can go unnoticed)

My understanding of macro hygiene is becoming more solid from this thought exercise, so thanks!

3 Likes