[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: [Chicken Gazette - Issue 13] - ##sys#:keyword:'s
From: |
F. Wittenberger |
Subject: |
[Chicken-users] Re: [Chicken Gazette - Issue 13] - ##sys#:keyword:'s |
Date: |
Mon, 22 Nov 2010 22:47:51 +0100 |
Am Montag, den 22.11.2010, 21:22 +0100 schrieb Peter Bex:
> On Saturday another new thread (!) was started by Alan Post in which
> he reported a bug in Chicken's keyword argument handling. He created a
> ticket in Trac to help track this bug, but with the help of Alex and
> Felix he found out it was not a bug in Chicken but in his own code;
> `string->symbol` does not produce keyword objects even when the string
> ends with a colon. After he changed his code to use `string->keyword`
> everything worked as it should. Keywords can be confusing things:
> they're not quite the same as symbols because they're self-evaluating,
> yet `symbol?` returns `#t`.
>
May I ask a simple question: what is the actual rational behind keywords
(wrt. symbols)?
Are there any good references?
So far may naive explanation would be: "a kind of a symbol, which is
guaranteed to originate from some ``source´´ code".
Which would mean: NOT producible by string->symbol (or string->keyword
or anything alike) from any program (e.g., the macro expansion!), but
traceable to a single source code position reference. (Which in turn
would allow something line (cdr (assq <keyword> <l10n-keyword-list>)) in
the macro expansion to map from the l10n-keyword to another one, because
that would be traceable to exactly that one pair in <l10n-keyword-list>,
which itself was already subject to the same "pre-compile-time" [or
literal source code] restriction.
A lot of words for a single bit's meaning.
Kinda too much for me.
Could we do away with them?
Boil them down to mere read syntax? ( 'x same as x: ?)
cheers
/Jörg