[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] keyword->string and back
From: |
felix |
Subject: |
Re: [Chicken-users] keyword->string and back |
Date: |
Wed, 21 Apr 2004 23:05:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 |
Alain MELLAN wrote:
With (keyword-style #:prefix), I get the following:
(keyword->string :foo) => "foo"
Well, this is actually intended to be like this.
(string->keyword "foo") => :foo
Also, a (format "~A" :foo) gives "foo", while (write :foo) gives :foo.
It seems only (write) ensures the write/read invariant behavior.
Yes, format should should print ":foo". I'll fix this.
I would like to have (format "~A" :foo) => ":foo", and (keyword->string
:foo) => ":foo" (depending on the keyword-style, of course).
Does that make sense?
Certainly. But I must hold on to keyword->string returning the non-decorated
name. The : is just a marker here (it might be #: or : at the end), so
the "canonical" name of a keyword is the name stripped of all markers.
cheers,
felix