So what it boils down to is this:  Chibi and Larceny currently use the R5RS (syntax-rules) implementation.  But Larceny has syntax-case because it is an R6RS system, and Chibi has syntax-case thanks to Marc.  The portable R6RS implementation should be tested on those.  If it works, then we can heave the syntax-rules implementation overboard as far as I am concerned, and eliminate the need for the parens in favor of a syntactic keyword like &keys.  Best of all worlds.



On Tue, Oct 22, 2019 at 3:33 PM John Cowan <xxxxxx@ccil.org> wrote:


On Tue, Oct 22, 2019 at 2:04 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
 
Apart from cleaner code, a syntax-case macro will retain source code
location information.

"May", not "will".  R6RS-Libraries 12.2 says:  "A syntax object [...] may also be used by an implementation to maintain source-object correlation".

This is not only important for debugging but
makes it possible to write macros like the R7RS form `include', which
shall include the file from the directory where the source of the
include form comes from.

Note that include in R7RS is non-hygienic: the code is interpolated as-is.
 
 
On the other hand, something like `syntax-e' can easily be implemented
on top of `syntax-case', so in any `syntax-case' system, you can use
your favorite pattern matcher.

The rock-bottom core of a syntax-case system (per Eli Barzilay of Racket) is syntax, syntax->datum, datum->syntax, and either syntax-e or syntax-case.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
All Gaul is divided into three parts: the part that cooks with lard and goose
fat, the part that cooks with olive oil, and the part that cooks with butter.
  --David Chessler