You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should print abcd the same as Gauche, all different implementations fail to run this code.
The problem is that this is a recursive deep first expansion and each expansion should create new unique value of args1 that is a free variable in this pattern. But because syntax-rules just collect the name and use them inside the macro they are the same. And last value is used.
jcubic
changed the title
Diffrent calls to hygienic macros should create unique hygien values
Different calls to hygienic macros should create unique hygiene values
Jan 23, 2024
This code from SRFI-210 doesn't work correctly:
It should print
abcd
the same as Gauche, all different implementations fail to run this code.The problem is that this is a recursive deep first expansion and each expansion should create new unique value of
args1
that is a free variable in this pattern. But because syntax-rules just collect the name and use them inside the macro they are the same. And last value is used.It's because this also works:
the same value in let-values works and x shadow previous x.
The text was updated successfully, but these errors were encountered: