[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Keyword syntax
From: |
Marius Vollmer |
Subject: |
Re: Keyword syntax |
Date: |
Mon, 18 Oct 2004 13:56:10 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
address@hidden (Paul Jarc) writes:
> Marius Vollmer <address@hidden> wrote:
>> As to 1), the simplest change would be to just do the equivalent of
>> (symbol->keyword (read port)).
>
> I like this way too.
Ok, I'll keep it that way then.
>> guile> #:12
>> ERROR: Wrong type (expecting symbol): 12
>
> You could add a bit of backward compatibility:
>
> (let ((obj (read port)))
> (symbol->keyword
> (if (symbol? obj)
> obj
> (string->symbol (object->string obj)))))
>
> But I'm not sure this would be worth it, or if there may be corner
> cases where it produces a different keyword.
This wouldn't be very much backwards compatible, I'm afraid, since
'read' is very much different from reading a token (with an internal
reader function).
We could keep more backwards compatability by continuing to read the
keyword name as a token, but only acception names that are proper
symbol names. Should we?