[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symbol is nested in #{ ...... }#
|
From: |
Damien Mattei |
|
Subject: |
Re: symbol is nested in #{ ...... }# |
|
Date: |
Thu, 4 Jan 2024 21:12:42 +0100 |
i understand not all.
i suppose it makes sense .
in fact my problem was parsing a scheme program to generate another scheme
program.
So i'm in the realm of simple text and as i was just searching the good
display i did not understand more the problem.
and even between kawa and racket behavior differs on keywords as in this
example:
#|kawa:1|# (string->keyword "apple")
apple:
Racket:
> (string->keyword "apple")
'#:apple
Damien
On Thu, Jan 4, 2024 at 8:05 PM Thompson, David <dthompson2@worcester.edu>
wrote:
> On Thu, Jan 4, 2024 at 6:36 AM Damien Mattei <damien.mattei@gmail.com>
> wrote:
> >
> > thank you very much Tomas,
> > it solved my problem:
> > (symbol->keyword (list->symbol ....
> > me too i was digging the manual for 2 hours :-)
> > Damien
> > note: seems a bit weird anyway that guile react differently in this case
> > than Kawa and Racket
>
> Guile's behavior makes sense to me. #{...}# is syntax for symbols, not
> keywords. Symbols can contain any arbitrary characters. Starting a
> symbol with "#:" doesn't make it a keyword. Would you expect
> (string->symbol "#:hello") to return a keyword? I wouldn't.
>
> - Dave
>