guile-user
[Top][All Lists]
Advanced

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

Re: symbol is nested in #{ ...... }#


From: Zelphir Kaltstahl
Subject: Re: symbol is nested in #{ ...... }#
Date: Thu, 4 Jan 2024 20:20:21 +0000

Hello Damien,

That is probably, because keywords themselves can look different in Kawa and 
Racket.

https://www.gnu.org/software/kawa/Keywords.html (mentions both syntaxes, but also mentions #:name being more portable)

https://docs.racket-lang.org/guide/keywords.html (only mentions #:name syntax).

Regards,
Zelphir

On 1/4/24 21:12, Damien Mattei wrote:
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

--
repositories: https://notabug.org/ZelphirKaltstahl




reply via email to

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