This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: incompatible change for keyword literals in Kawa Scheme
* Per Bothner [2009-03-08 19:09+0100] writes:
> What complicates this is:
> (1) Need to handle hygienic macros and "syntax objects".
> (2) Need to preserve actual input syntax - i.e. we need to
> distinguish |foo:bar| from |foo|:|bar|. In this model foo:
> could be a symbol |foo:| that has a pre-defined binding of the
> corresponding Keyword, but it could be rebound to some other
> value. However, |foo:| might disable the keyword lookup, so
> |foo:| would be an identifier. A quoted 'foo: would evaluate
> to the symbol |foo:|. Things like this could be handled by a
> mechanism to get the "raw source token" from a syntax object,
> but it might be getting close to the overly-clever side.
I guess |3cm| or \3cm has the same issue.
Anyway, I have some trouble with this code:
(keyword? foo:)
=> true
(define (read-from-string s) (call-with-input-string s read))
(keyword? (read-from-string "foo:"))
=> false
Why does the second call to keyword? return false?
Helmut.