On Tue, Oct 22, 2019 at 5:08 PM Lassi Kortela <xxxxxx@lassi.io> wrote:
 
> One per kind of native keywords, using the low-level macros available there.

It's even better than this: Chicken uses ER; Kawa, Guile and Racket use
syntax-case (thanks to you and Marc).

Sure.  But systems with native keywords need their own implementations to generate the correct format, no matter what macro system they are written in.

Bigloo, Gambit, Gauche, Sagittarius, STklos, S7 use define-macro.
Hints/help for converting any of these to hygienic macros are welcome.

Bigloo has syntax-rules (but see below)

Gambit's syntax-rules support has apparently bit-rotted, but as he implements R7RS it should come back (but see below).

Gauche has ER.

Sagittarius is R6RS, so the portable implementation should work.  

STKlos has syntax-rules.

You are stuck with define-macro for S7.

With the current parenthesis-based syntax (a b c (d e f)) we can just as
well use syntax-rules. If we decide to change it to something like (a b
c &key d e f) I will switch to syntax-case.

In practice I think it's the other way around.  If we decide that we don't have to support a syntax-rules-only implementation, then we can safely go with &key.  I take it for granted that &key is better.

Here are the systems that don't have syntax-case: Gauche, MIT, Chicken, Bigloo, Scheme48/scsh, SCM, STklos, Scheme 9, Foment, Picrin, Owl Lisp, Lispkit, Rapid.

Here are the systems that have neither syntax-case nor ER but do have syntax-rules: Bigloo, SCM, STklos, Scheme 9, Foment, Owl Lisp, Lispkit, Rapid.

Here are the systems that have only define-macro or syntax-rules : Bigloo, S7, RScheme, Rep, Elk, Dfsch, Lispkit, Rapid

Here are the systems that have only define-macro but have native keywords: S7

Here are the systems that have only syntax-rules but have native keywords: Bigloo.

So if we have syntax-case and ER implementations of the &key style, then we need define-macro to support native keywords in S7 and Bigloo only.  The remaining systems with just define-macro support (S7, RScheme, Rep, Elk, Dfsch, Scheme 9) can be declared unsupported, unless you want to write implementations for them.  Only Rapid and Lispkit are completely out in the cold, as they have only syntax-rules (I think).

Q.E.D.

> One over ER

The current Chicken implementation is based on explicit renaming. Is it
needed for other implementations?

Gauche, MIT, Scheme48/scsh, Picrin, Husk.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Today an interactive brochure website, tomorrow a global content
management system that leverages collective synergy to drive "outside of
the box" thinking and formulate key objectives into a win-win game plan
with a quality-driven approach that focuses on empowering key players
to drive-up their core competencies and increase expectations with an
all-around initiative to drive up the bottom-line. --Alex Papadimoulis