Gauche icon indicating copy to clipboard operation
Gauche copied to clipboard

idea: Syntactic pairs

Open shirok opened this issue 6 months ago • 0 comments

An issue I'm having with syntax-case macros is that it no longer deals with raw S-expressions but wrapped syntactic forms. It seems to lose the beauty of Lisp macros. Sure, a bunch of specialized macros hide the business of destructure/construct syntactic forms, but that seems a band-aid.

The idea here is that, in Gauche, we can hide the syntactic wrapping, in a similar way as our lazy sequences.

Gauche's lazy sequences are effectively a wrapped pair whose cdr hasn't been realized. They are implicitly unwrapped when touched, so you don't see the wrapper explicitly. We could use the same mechanism to implicitly unwrap syntactic wrappers.

shirok avatar Jan 28 '24 05:01 shirok