guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyword syntax


From: Paul Jarc
Subject: Re: Keyword syntax
Date: Mon, 04 Oct 2004 14:51:03 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

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.

>         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.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]