Email list hosting service & mailing list manager

Wrapping up SRFI 177: Portable keyword arguments Lassi Kortela (22 Feb 2020 00:48 UTC)
Comparing current and potential future syntaxes Lassi Kortela (22 Feb 2020 01:25 UTC)
Re: Comparing current and potential future syntaxes John Cowan (22 Feb 2020 22:17 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments John Cowan (22 Feb 2020 21:22 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments Lassi Kortela (22 Feb 2020 22:17 UTC)
Hygiene and allow-other-keys Lassi Kortela (22 Feb 2020 22:39 UTC)
Re: Hygiene and allow-other-keys Shiro Kawai (22 Feb 2020 23:48 UTC)
Re: Hygiene and allow-other-keys John Cowan (22 Feb 2020 23:52 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments John Cowan (22 Feb 2020 23:40 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments Shiro Kawai (22 Feb 2020 23:58 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments Lassi Kortela (23 Feb 2020 00:12 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments John Cowan (23 Feb 2020 01:03 UTC)
Required keyword arguments Lassi Kortela (23 Feb 2020 07:39 UTC)
Re: Required keyword arguments John Cowan (23 Feb 2020 16:35 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments Marc Nieper-Wißkirchen (23 Feb 2020 08:33 UTC)
Re: Wrapping up SRFI 177: Portable keyword arguments Lassi Kortela (23 Feb 2020 10:09 UTC)

Comparing current and potential future syntaxes Lassi Kortela 22 Feb 2020 01:25 UTC

Exploring a bit more:

- SRFI 177 (compatible, simple and dumb, hacks are ok)

   (define/kw (foo a b c :key d e f) ...)
   (call/kw foo 1 2 3 :d 4 :e 5 :f 6)

   - All of #:key and :key and key: are recognized and equivalent.
   - All of #:e and :e and e: are recognized and equivalent.
   - All identifiers and keyword objects refer to global keywords.

- Future hygienic keywords SRFI

   (define/kw (foo a b c (d e #:f)) ...)
   (call/kw foo 1 2 3 (d 4 e 5 #:f 6))

   The parentheses show which args are in keyword position.
   Keyword objects stand for global non-hygienic keywords,
   whereas ordinary identifiers are hygienic keywords.

Instead of the parenthesis, could also use a standalone one-character :
identifier. But I think it's hard to read when used together with the #:
global keyword object syntax:

(call/kw foo 1 2 3 : #:d 4 #:e 5 #:f 6)
(call/kw foo 1 2 3 : #:d 4 : #:e 5 : #:f 6)

Hygienic keywords would make it only slightly easier to read:

(call/kw foo 1 2 3 : d 4 : e 5 : f 6)

At this point I would already find the original syntax easier:

(call/kw foo 1 2 3 (#:d 4 #:e 5 #:f 6))
(call/kw foo 1 2 3 (d 4 e 5 f 6))

I'd like to re-iterate that much more important than the particular
syntaxes we pick, is that any syntax can call keyword procedures defined
with any other syntax. As long as we honor that requirement, we cannot
mess up too badly. But if we don't, we'll end up with a situation like
incompatible module systems that's an impediment to portable Scheme.