* at sign as symbol name
@ 2014-12-28 21:14 Seth Alves
2014-12-28 22:29 ` Per Bothner
0 siblings, 1 reply; 3+ messages in thread
From: Seth Alves @ 2014-12-28 21:14 UTC (permalink / raw)
To: kawa mailing list
In r7rs-small, I see this:
All implementations of Scheme must support the following
extended identifier characters:
! $ % & * + - . / : < = > ? @ ^ _ ~
and other schemes seem okay with it. Should kawa accept '@ as a
symbol? I notice that
(string->symbol "@")
works.
-seth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: at sign as symbol name
2014-12-28 21:14 at sign as symbol name Seth Alves
@ 2014-12-28 22:29 ` Per Bothner
2014-12-28 22:39 ` Seth Alves
0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2014-12-28 22:29 UTC (permalink / raw)
To: kawa
On 12/28/2014 01:14 PM, Seth Alves wrote:
> In r7rs-small, I see this:
>
> All implementations of Scheme must support the following
> extended identifier characters:
> ! $ % & * + - . / : < = > ? @ ^ _ ~
>
> and other schemes seem okay with it. Should kawa accept '@ as a symbol?
It does if you specify --r7rs on the command line.
The problem is that @ is used for the splice syntax, which I think is is
more useful than identifiers that start with @.
We could hack '@ so it works, but that doesn't help for unquoted
identifiers. We could also do something similar that Kawa does for colon:
If @ is followed by a possibly-empty identifier NAME (i.e. @NAME)
we could disambiguate depending on syntactic context (e.g. in define)
and which of NAME or @NAME has an in-scope lexical binding. That
would be somewhat hackish and not 100% compatible - just like the
colon handling. I figure if you really want an identifier that
starts with a @ use the --r7rs flag.
> I notice that
>
> (string->symbol "@")
>
> works.
Right, but note that (write (string->symbol "@"))
writes "|@|" (with escapes).
(However, (write (string->symbol ":")) just
writes ":" which is a bug ...)
--
--Per Bothner
per@bothner.com http://per.bothner.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: at sign as symbol name
2014-12-28 22:29 ` Per Bothner
@ 2014-12-28 22:39 ` Seth Alves
0 siblings, 0 replies; 3+ messages in thread
From: Seth Alves @ 2014-12-28 22:39 UTC (permalink / raw)
To: kawa
Oh, okay. That's fine -- I keep forgetting to include --r7rs.
-seth
On 12/28/2014 02:29 PM, Per Bothner wrote:
>
>
> On 12/28/2014 01:14 PM, Seth Alves wrote:
>> In r7rs-small, I see this:
>>
>> All implementations of Scheme must support the following
>> extended identifier characters:
>> ! $ % & * + - . / : < = > ? @ ^ _ ~
>>
>> and other schemes seem okay with it. Should kawa accept '@ as a symbol?
>
> It does if you specify --r7rs on the command line.
>
> The problem is that @ is used for the splice syntax, which I think is is
> more useful than identifiers that start with @.
>
> We could hack '@ so it works, but that doesn't help for unquoted
> identifiers. We could also do something similar that Kawa does for
> colon:
> If @ is followed by a possibly-empty identifier NAME (i.e. @NAME)
> we could disambiguate depending on syntactic context (e.g. in define)
> and which of NAME or @NAME has an in-scope lexical binding. That
> would be somewhat hackish and not 100% compatible - just like the
> colon handling. I figure if you really want an identifier that
> starts with a @ use the --r7rs flag.
>
>> I notice that
>>
>> (string->symbol "@")
>>
>> works.
>
> Right, but note that (write (string->symbol "@"))
> writes "|@|" (with escapes).
>
> (However, (write (string->symbol ":")) just
> writes ":" which is a bug ...)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-28 22:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 21:14 at sign as symbol name Seth Alves
2014-12-28 22:29 ` Per Bothner
2014-12-28 22:39 ` Seth Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).