This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 12: symbol literal extensions

2012-10-04 23:47:16
WG1 - Reader Syntax
alexshinn
major
alexshinn
fixed
source
closed
2010-02-23 16:29:26
defect

R6RS added exceptions for symbols beginning with "->". Do we accept this, or allow even more symbols?

My sense was that most R5RS systems accept anything as an identifier that doesn't parse as a number. Here's what I found using '(+on+ 4bsd -off-):

PLT, Gauche, MIT, Gambit, Chicken, Bigloo, scsh, Scheme 9, Scheme 7, VSCM are okay with it.

Scheme48, Ikarus, Larceny, SSCM, SXM, Chibi report lexical syntax errors.

I don't know of any Scheme that supports extensions to the R5RS/R6RS syntax of numbers that would make these identifiers a problem. I recommend that we allow them.

Chibi accepts +on+ and -off-, it just doesn't allow symbols beginning with digits. It seems much more likely that someone started to write a number and got a suffix wrong. For instance, you propose 4bsd as a symbol, but 4d0 is valid R5RS numeric syntax.

milestone

WG1 accepted Alex Shinn's proposal.

resolutionfixed
statusnewclosed

that is, symbols may not begin with a number prefix

resolutionfixed
statusclosedreopened
owneralexshinn
statusreopenedassigned
statusassigneddecided
owneralexshinn
statusdecidedwriting
resolutionfixed
statuswritingclosed