29
78
Fork
You've already forked r7rs
2
Page: Hash notation
Pages Agenda 2025年09月16日 Agenda 2025年09月27日 Agenda 2025年10月09日 Agenda 2025年10月28日 Agenda 2025年11月21日 Agenda 2026年03月08日 Agenda 2026年03月23日 Agenda 2026年04月16日 Agenda 2026年04月30日 Agenda 2026年05月19日 Agenda 2026年06月08日 Agenda 2026年06月29日 Alternative SRFI 271 library structure Cleanup Consent Docket 1 Collections procedures Committee B Committee C Committee E Committee F Committee P Delimited continuations Draft Agenda FAQ Fixnum behavior Foundations Guiding Principles Foundations Issues Foundations implementation types Hash notation Home INoncharacter error handling Identifier property use cases Meetings Minutes 2025年09月16日 Minutes 2025年09月27日 Minutes 2025年10月09日 Minutes 2025年10月28日 Minutes 2025年11月21日 Minutes 2026年03月08日 Minutes 2026年03月23日 Minutes 2026年04月16日 Minutes 2026年04月30日 Minutes 2026年05月19日 Minutes 2026年06月08日 Minutes 2026年06月29日 Needed SRFIs Number vs escaped symbol in library name Process document R6RS features and compatibility R6RS rejection reasons R7RS Docbook Edition R7RS incompatibilities with R6RS R7RS small errors in the C system Raw String Literals in Other Languages Record extension Record system features Reducing SRFI 226 Statement on SC Election Stygian Blue and Reddish Green ballot proposals Surrogate pairs The Aquamarine Ballot The Record Systems of R7RS Implementations Van Tonder expander arguments WG2 Members phm ­— OS Strings phm Process Organization Proposal utf8->string behavior
2 Hash notation
johnwcowan edited this page 2023年07月19日 23:44:05 +00:00

The following non-identifier characters after # are taken:

  • #' by syntax in syntax-case (R6RS, strongly implied in R7RS too by the adoption of syntax-case)
  • #` by quasisyntax (ditto)
  • #, by unsyntax and #,@ by unsyntax-splicing (ditto)
  • #( by vectors (small language)
  • #\ by characters (small language)
  • #| for nestable block comments (small language)

This leaves #", #., ##, and #| as the only remaining #-sequences beginning with characters which are definitively not allowed at the start of identifiers (unless those identifiers are written in pipes, a possibility we can safely ignore in this context). The following identifier characters are also taken:

  • #b for binary numeric literals (small language)
  • #c by homogeneous vectors of complex numbers (strongly implied by the adoption of SRFI 160)
  • #d as an explicit prefix for decimal numbers (small language)
  • #e for exact numeric literals (small language)
  • #f for the false constant (small language) and homogeneous vectors of floats (strongly implied by adoption of SRFI 160)
  • #i for inexact numeric literals (small language)
  • #o for octal numeric literals (small language)
  • #s for homogeneous vectors of signed numbers (strongly implied by adopting SRFI 160)
  • #t for the true constant (small language)
  • #u for bytevectors (small language) and homogeneous vectors of unsigned numbers (strongly implied by adopting SRFI 160)
  • #x for hexadecimal numeric literals
  • #! for the reader directives #!fold-case and #!no-fold-case (small language)

From the Common Lisp standard readtable:

dispatch char purpose dispatch char purpose 
Backspace signals error { undefined* 
Tab signals error } undefined* 
Newline signals error + read-time conditional 
Linefeed signals error - read-time conditional 
Page signals error . read-time evaluation 
Return signals error / undefined 
Space signals error A, a array 
! undefined* B, b binary rational 
" undefined C, c complex number 
# reference to = label D, d undefined 
$ undefined E, e undefined 
% undefined F, f undefined 
& undefined G, g undefined 
' function abbreviation H, h undefined 
( simple vector I, i undefined 
) signals error J, j undefined 
* bit vector K, k undefined 
, undefined L, l undefined 
: uninterned symbol M, m undefined 
; undefined N, n undefined 
< signals error O, o octal rational 
= labels following object P, p pathname 
> undefined Q, q undefined 
? undefined* R, r radix-n rational 
@ undefined S, s structure 
[ undefined* T, t undefined 
\ character object U, u undefined 
] undefined* V, v undefined 
^ undefined W, w undefined 
_ undefined X, x hexadecimal rational 
` undefined Y, y undefined 
| balanced comment Z, z undefined 
~ undefined Rubout undefined

Sources: