> This is a reminder that SRFI 177 <https://srfi.schemers.org/srfi-177/>:
> Portable keyword arguments, has been under public discussion for 270
> days. (It was first published on 2019-10-16.) The discussion can go on,
> but in theory, the longest extension was supposed to have been to ninety
> days.
Apologies for the huge delay. I take full responsibility for it.
Let's decide on the final specification now.
I looked into identifier syntax as Marc suggested, and the standard
`syntax-case` in R6RS easily allows specifying a `foo` macro with
different behavior for the `(foo ...)` case (i.e. a list) and the `foo`
case (i.e. the bare identifier by itself, as if it were a variable).
(Chez Scheme's `identifier-syntax` is a different but related facility.
It specifies a `foo` macro with only the bare-identifier version; using
`(foo)` as a list will be an error. However, `identifier-syntax` lets
one define a custom setter for set!, similar to SRFI 17 (Generalized
set) or Common Lisp's "setf places".)
However, Kawa's syntax-case doesn't handle bare-identifier syntax the
way R6RS does. I sent a question about this to the Kawa mailing list.
I can't find any variant of `syntax-rules` supporting identifier syntax,
though perhaps it could be added in a backward-compatible way.
(define-syntax foo (syntax-rules () (_ 123))) is currently a syntax error.
It's doubtful that the various versions of the CL-style `define-macro`
can define macros with separate `(foo ...)` and `foo` expansions.