Email list hosting service & mailing list manager

Re: Reviewing named and optional parameters Daphne Preston-Kendal (31 Jul 2021 10:02 UTC)
Reviewing named and optional parameters Daphne Preston-Kendal (07 Jun 2021 15:45 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (07 Jun 2021 16:07 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (09 Jun 2021 08:49 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 09:13 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (09 Jun 2021 09:42 UTC)
Re: Reviewing named and optional parameters Marc Feeley (09 Jun 2021 10:24 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 10:32 UTC)
Re: Reviewing named and optional parameters Marc Feeley (09 Jun 2021 12:16 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 12:40 UTC)
Re: Reviewing named and optional parameters Marc Feeley (09 Jun 2021 13:10 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 15:56 UTC)
Re: Reviewing named and optional parameters Marc Feeley (09 Jun 2021 18:15 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 10:27 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (14 Oct 2021 10:42 UTC)
Re: Reviewing named and optional parameters John Cowan (09 Jun 2021 17:22 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 17:37 UTC)
Re: Reviewing named and optional parameters Peter Bex (08 Jun 2021 05:17 UTC)
Re: Reviewing named and optional parameters Per Bothner (08 Jun 2021 05:38 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (09 Jun 2021 09:00 UTC)
Re: Reviewing named and optional parameters Per Bothner (10 Jun 2021 17:23 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (21 Jun 2021 07:23 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (09 Jun 2021 08:55 UTC)
Re: Reviewing named and optional parameters John Cowan (09 Jun 2021 14:29 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 14:44 UTC)
Re: Reviewing named and optional parameters John Cowan (09 Jun 2021 17:03 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 17:33 UTC)
Re: Reviewing named and optional parameters John Cowan (09 Jun 2021 17:37 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 17:40 UTC)
Re: Reviewing named and optional parameters John Cowan (09 Jun 2021 19:01 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (09 Jun 2021 19:25 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (10 Jun 2021 10:17 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (10 Jun 2021 11:18 UTC)
Re: Reviewing named and optional parameters John Cowan (12 Jun 2021 22:08 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (21 Jun 2021 07:21 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (21 Jun 2021 10:37 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (29 Jul 2021 09:42 UTC)
Re: Reviewing named and optional parameters John Cowan (29 Jul 2021 23:34 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (30 Jul 2021 07:03 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (30 Jul 2021 07:31 UTC)
Re: Reviewing named and optional parameters John Cowan (30 Jul 2021 21:39 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (30 Jul 2021 21:47 UTC)
Re: Reviewing named and optional parameters John Cowan (30 Jul 2021 21:49 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (30 Jul 2021 21:59 UTC)
Re: Reviewing named and optional parameters John Cowan (30 Jul 2021 21:32 UTC)
Re: Reviewing named and optional parameters
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (31 Jul 2021 10:29 UTC)
Re: Reviewing named and optional parameters John Cowan (31 Jul 2021 17:33 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (31 Jul 2021 17:45 UTC)
Re: Reviewing named and optional parameters Marc Nieper-Wißkirchen (31 Jul 2021 18:04 UTC)
Re: Reviewing named and optional parameters John Cowan (31 Jul 2021 19:52 UTC)
Re: Reviewing named and optional parameters Daphne Preston-Kendal (02 Dec 2021 17:57 UTC)
Re: Reviewing named and optional parameters Jeronimo Pellegrini (03 Dec 2021 03:32 UTC)

Re: Reviewing named and optional parameters Daphne Preston-Kendal 31 Jul 2021 10:02 UTC

On 30 Jul 2021, at 23:32, John Cowan <xxxxxx@ccil.org> wrote:

> On Fri, Jul 30, 2021 at 3:03 AM Daphne Preston-Kendal <xxxxxx@nonceword.org> wrote:
>
>>> > In R7RS, :|123| is always going to be indistinguishable from |:123|; this has nothing to do with keywords being disjoint or not.
>>
>> *In*distinguishable? At present, the former in Chibi gives me a symbol which the writer gives back out as |:\|123\||; |:123| is a symbol :123.
>
> Actually it seems that :|123| is indeterminate in the R7RS formal syntax, which only allows tokens without |s or with one at each end.

Then we can safely define either

keyword → ⟨identifier⟩ :
(DSSSL style)
*or*
keyword → : ⟨identifier⟩
(Common Lisp style)

in Large, no? Assuming we choose to have some kind of lexical keyword type (which I think would be a good idea, notwithstanding programs that use them probably automatically lose small portability).

>> > Default vs. no-default keywords:  the signature of CL's `make-array` is (make-array dimensions &key adjustable fill-pointer displaced-to displaced-index-offset element-type initial-element initial-contents).  Of these, all have defaults except the last two, or perhaps it is more accurate to say the default is implementation-specified.  But it is definitely not nil, because filling the array with nils is not the same as not filling the array.
>>
>> Are you saying that in CL, if I pass nil explicitly to all those keyword arguments of make-array, it has a different effect to if I’d omitted them?
>
> Yes. Specifically:
> <snipped for brevity>

Okay, so there’s some internal magic going on here to detect which keywords were actually passed and supply the defaults, despite there being no defaults in the method signature? Or does CL have another way to do that detection?

>> I will mention it, but I don’t think even Guile supports this in Scheme. What’s the intended use?
>
> To wrap a keyword function in another keyword function, thus (from CLHS):
>
>  (defun array-of-strings (str dims &rest named-pairs
>                           &key (start 0) end &allow-other-keys)
>    (apply #'make-array dims
>           :initial-element (subseq str start end)
>           :allow-other-keys t
>           named-pairs))
>
> The &allow-other-keys allows make-array arguments to be accepted by array-of-strings without having to enumerate them in the lambda-list, which allows implementation-specific keywords to be passed (for example, a keyword that causes the array to be stored in unmanaged memory).  However, make-array does not make use of keywords :start and :end, but by specifying :allow-other-keys, the call to apply will not reject them.  (Note that `apply` itself has no keywords, so all the key-value pairs passed to it are simply prepended to named-pairs.)

Ahhh. Okay. Hmm. Thank you for the explanation.

Daphne