Skip to content

Commit 2156d3e

Browse files
author
Tomas Pevny
committed
fixing
1 parent ecc6da5 commit 2156d3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/lectures/lecture_07/lecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ run(`touch $(filename)`)
251251
```
252252
:::
253253

254-
## [Macro hygiene](@id lec7_hygiene)
254+
## Macro hygiene
255255
Macro hygiene is a term coined in 1986 addressing the following problem: if you're automatically generating code, it's possible that you will introduce variable names in your generated code that will clash with existing variable names in the scope in which a macro is called. These clashes might cause your generated code to read from or write to variables that you should not be interacting with. A macro is hygienic when it does not interact with existing variables, which means that when macro is evaluated, it should not have any effect on the surrounding code.
256256

257257
By default, all macros in Julia are hygienic which means that variables introduced in the macro have automatically generated names, where Julia ensures they will not collide with user's variable. These variables are created by `gensym` function / macro.

0 commit comments

Comments
 (0)