3 ms·
> (syntax-rules ...) The very first time I tried to use it, I ran into its limitations syntax-case is the general purpose construct to use. syntax-rules is a
by floxy 5mo ago
> (syntax-rules ...) The very first time I tried to use it, I ran into its limitations
syntax-case is the general purpose construct to use. syntax-rules is a restricted, easy-things-should-be-easy construct.
https://www.scheme.com/tspl2d/syntax.html https://www.scheme.com/tspl2d/syntax.html
- bjoli 5mo agoYou don't need syntax case to do advanced things though. Alex shinn's match.scm uses all the dirty syntax-rules trick. It is pretty awful to write things like that.
- crabbone 5mo agoIt's just not good because you need to work around its limitations, whatever its purpose is. Not good for prototyping because it's the red tape you need to cut to get work done. Red tape isn't, in general, a bad thing, but when it comes to prototyping it is.
- bjoli 5mo agoI think most people misunderstood syntax rules. It was not meant as the macro system for scheme. It was meant as the template macro system everyone could agree on, while leaving the more powerful low level macro systems to the implementations. Syntax case, or explicit/implicit renaming or syntactic closures or what have you.
- soegaard 5mo agoAgree. It got the ball rolling.