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 80: Extended symbol/identifier syntax

2010-11-15 09:53:25
WG1 - Reader Syntax
alexshinn
major
cowan
duplicate
source
closed
2010-09-07 17:46:22
defect

In R5RS, a token that begins with a numeric character (0-9, +, -) but is not a number is considered erroneous, with the exceptions of the symbols + and -. R6RS extends this to tokens that begin with ->.

Shall we simply say that any such token is a valid symbol? Currently, Racket, Gauche, MIT Scheme, Gambit, Chicken, Scheme48/scsh, Guile, Kawa and SISC do so. Of these, Gauche, Kawa, and SISC output such identifiers with | escaping, showing that these implementations treat such symbols as second-class (or perhaps for increased portability of Scheme data). Chibi accepts symbols with no digits such as -foo, but reject tokens like 2a2.

Common Lisp reserves such tokens under the name of "potential numbers", but as far as I can tell nobody uses them for anything -- it's too difficult to mutate the readtable, and there is no standard hook to provide an interpretation.

resolutionduplicate
statusnewclosed

Duplicate of #12.