Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 19:42 UTC)
Re: Keyword arguments in procedures specified in SRFIs Arthur A. Gleckler (21 Jul 2019 20:43 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 20:52 UTC)
Re: Keyword arguments in procedures specified in SRFIs Arthur A. Gleckler (21 Jul 2019 20:55 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 21:12 UTC)
Re: Keyword arguments in procedures specified in SRFIs Amirouche Boubekki (21 Jul 2019 21:30 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (21 Jul 2019 21:47 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 22:45 UTC)
(missing)
Re: Keyword arguments in procedures specified in SRFIs Arthur A. Gleckler (22 Jul 2019 01:27 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (22 Jul 2019 05:22 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 09:07 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 09:24 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 22:06 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (21 Jul 2019 21:22 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (21 Jul 2019 21:48 UTC)
Re: Keyword arguments in procedures specified in SRFIs Shiro Kawai (22 Jul 2019 16:54 UTC)
Re: Keyword arguments in procedures specified in SRFIs Peter Bex (22 Jul 2019 18:52 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (22 Jul 2019 19:09 UTC)
Re: Keyword arguments in procedures specified in SRFIs Peter Bex (22 Jul 2019 19:22 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 19:32 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (22 Jul 2019 20:08 UTC)
Re: Keyword arguments in procedures specified in SRFIs Marc Feeley (22 Jul 2019 20:36 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (22 Jul 2019 21:56 UTC)
Re: Keyword arguments in procedures specified in SRFIs Marc Feeley (22 Jul 2019 19:36 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 20:22 UTC)
Re: Keyword arguments in procedures specified in SRFIs Per Bothner (23 Jul 2019 00:22 UTC)
Re: Keyword arguments in procedures specified in SRFIs Peter Bex (23 Jul 2019 05:39 UTC)
Re: Keyword arguments in procedures specified in SRFIs Per Bothner (23 Jul 2019 05:57 UTC)
Re: Keyword arguments in procedures specified in SRFIs Peter Bex (23 Jul 2019 06:02 UTC)
Re: Keyword arguments in procedures specified in SRFIs Shiro Kawai (22 Jul 2019 22:05 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 23:13 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (22 Jul 2019 23:58 UTC)
Re: Keyword arguments in procedures specified in SRFIs Shiro Kawai (23 Jul 2019 03:35 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (24 Jul 2019 12:11 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (24 Jul 2019 12:34 UTC)
Re: Keyword arguments in procedures specified in SRFIs Marc Feeley (24 Jul 2019 13:26 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (24 Jul 2019 13:42 UTC)
Re: Keyword arguments in procedures specified in SRFIs Marc Feeley (24 Jul 2019 14:05 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (24 Jul 2019 15:55 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (24 Jul 2019 13:32 UTC)
Re: Keyword arguments in procedures specified in SRFIs shiro.kawai@xxxxxx (26 Jul 2019 14:20 UTC)
Re: Keyword arguments in procedures specified in SRFIs John Cowan (21 Jul 2019 20:49 UTC)
Re: Keyword arguments in procedures specified in SRFIs Per Bothner (22 Jul 2019 05:44 UTC)
Re: Keyword arguments in procedures specified in SRFIs Lassi Kortela (22 Jul 2019 08:35 UTC)
Re: Keyword arguments in procedures specified in SRFIs Per Bothner (22 Jul 2019 15:52 UTC)

Re: Keyword arguments in procedures specified in SRFIs Amirouche Boubekki 21 Jul 2019 21:30 UTC

Le dim. 21 juil. 2019 à 23:12, Lassi Kortela <xxxxxx@lassi.io> a écrit :
>
> >     But are the different keyword _objects_ incompatible with each other?
> >
> > I suppose it would work, but it means that the calling code wouldn't be
> > portable, of course.
>
> That's true. But it's quite difficult to maintain complex programs
> without keyword arguments since it's almost impossible to plan years
> ahead what arguments are needed in some procedures. Therefore it would
> really help the community to have keywords figured out.
>
> This could make another case for that #!(srfi 88) facility discussed
> some time ago on this list to enable or disable the syntax extensions
> from particular SRFIs. (Or John's preference without parens, #!srfi 88)
> For example, if a source file uses SRFI 88 style keywords it could have
> #!(srfi 88) at the start. If it used Common Lisp style keywords, it
> could have #!cl-keywords or something (haven't thought about this).
>
> This would enable each source file, plus the REPL, to separately choose
> its own keyword syntax. One implementation could support all of them
> this way. Would there be problems with this approach?

I never use keyword argument in Scheme. In Python I use them for documentation
purpose, but good naming can avoid that problem. FWIW, Guile has them in a
convoluted way (you can reference arguments in other arguments and their are
bound at call time) and I find it... disturbing. At some point Python
arguments will
be Turing Complete for sure.

FWIW, the worst thing in keyword arguments in Python is the **kwargs which
is equivalent to Guile #:allow-other-keys. Yes Guile use #:keyword for keywords
another thing that is disturbing. People end up abusing **kwargs and pass around
all the keys and only pick what they want / need when they need it. It somewhat
like an evaluator environment at the user level. It is horrible and
harm readability,
hurt mainteance (see Flask for instance).

I think adding keyword, will make procedure signature much more difficult.

The solution to use alist or case-lambda is enough complication.

What I was thinking about this topic, is not introduce another datum
like :keyword
or #:keyword but instead create some argument parser procedure like used
for command line arguments. This is backward compatible and build upon existing
knowledge.

E.g.

(define (my-procedure . args)
  (receive (parse-args '--wal? '--in-memory?)
    (wal? in-memory?) ....)))

I don't know what are plist.

--
Amirouche ~ amz3 ~ https://hyper.dev