top | item 40992801

(no title)

rmrfchik | 1 year ago

Defmacro isn't hygienic, while syntax- is. Is there way to use arbitrary names in hygienic syntax- macros?

discuss

order

shawn_w|1 year ago

If you know the name ahead of time, syntax parameters[1] (if your scheme supports them) work well. syntax-case lets you break hygiene to insert new names in a controlled fashion (but has issues with names known ahead of time; see linked paper). Renaming macros do too, I believe.

1: http://scheme2011.ucombinator.org/papers/Barzilay2011.pdf

bjoli|1 year ago

syntax-case can introduce arbitrary bindings using datum->syntax.