Re: Keyword arguments in procedures specified in SRFIs
Per Bothner 23 Jul 2019 00:22 UTC
On 7/22/19 1:22 PM, Lassi Kortela wrote:
>> As a data type, are keywords a subtype of symbols or disjoint from them? I think they are generally a subtype, but they are disjoint in Chicken. Presumably they are disjoint in Racket and Kawa as well.
> Kawa:
>
> (keyword? '#:foo) => #t
> (symbol? '#:foo) => #t
> (symbol->string '#:foo) => "foo:"
> 'foo: => foo:
> (keyword? 'foo:) => #t
> (eqv? 'foo: ':foo) => #f
> (eqv? 'foo: '#:foo) => #t
>
Note that Kawa actually has packages/namespaces:
https://www.gnu.org/software/kawa/Namespaces.html
These are used for XML-style namespaces, and also Common Lisp packages.
Keywords in Kawa are in a separate "keyword namespace", like Common Lisp.
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/