Keyword support in SRFI 198 Lassi Kortela (02 Aug 2020 06:50 UTC)
Re: Keyword support in SRFI 198 Lassi Kortela (02 Aug 2020 06:58 UTC)
Re: Keyword support in SRFI 198 Shiro Kawai (02 Aug 2020 07:07 UTC)
Re: Keyword support in SRFI 198 Lassi Kortela (02 Aug 2020 07:40 UTC)
Re: Keyword support in SRFI 198 Marc Nieper-Wißkirchen (02 Aug 2020 15:00 UTC)

Keyword support in SRFI 198 Lassi Kortela 02 Aug 2020 06:49 UTC

To mesh with a possible Scheme standard with keywords, should we specify
that keyword objects (where available) are equivalent to symbols in
make-foreign-error and raise-foreign-error property names?

In other words, these would mean the same:

(make-foreign-error
  'set 'errno
  'code 'ETOOMANYREFS
  'message "Too many references: can't splice"

(make-foreign-error
  :set 'errno
  :code 'ETOOMANYREFS
  :message "Too many references: can't splice")

(make-foreign-error
  set: 'errno
  code: 'ETOOMANYREFS
  message: "Too many references: can't splice")

Two points of note:

1) With Common Lisp style keyword calls (which are used in most Scheme
implementations that have keywords), make-foreign-error and
raise-foreign-error can have a rest argument, or possibly &allow-other-keys.

2) With Kawa/Racket style keyword calls, we would have to use a rest
argument and quote the keyword objects:

(make-foreign-error
  '#:set 'errno
  '#:code 'ETOOMANYREFS
  '#:message "Too many references: can't splice")

I can't find an equivalent of Common Lisp's &allow-other-keys in either
Racket or Kawa.