Re: Keyword arguments in procedures specified in SRFIs Peter Bex 22 Jul 2019 19:22 UTC
On Mon, Jul 22, 2019 at 03:09:24PM -0400, John Cowan 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. They were a subtype, but that caused all sorts of confusion. Keywords could be bound, but this messes with the self-evaluating/self-quoting aspect. You need some way to distinguish between these the two intentions of wanting the bound value or the keyword object itself. Keywords are also messy with macros. It's nice if you can use keywords as "guard objects" in syntax-rules macros, like strings or other literals. But then, if they can be bound, the user might actually have intended the pattern to introduce a binding, instead. There are issues with keywords in low-level macros as well, but I forgot what exactly. Probably unhygienic construction issues. Cheers, Peter