[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reader # syntax and whitespace



Is the reader required to accept whitespace between sharp dispatch
sequences and the "following arguments in some form" (CLtL p.351)?  The
answer obviously is no for #\x but not so clear for others:

	#s (foo a 1 b 2)
	#2a ((1 2 3) (4 5 6))
	#' (lambda (x) (* x 2))

The strong similarity of each such "syntax" to a normal list suggests
that the reader will recursively use normal read, which implies that
whitespace will be skipped.  But should one rely on it across all
implementations?  If so, what about these?

	#+ lisp1.5
	#: foo
	#x f98e
	#B 01110110
	#3R 121211

These violate my aesthetic sense that single atoms are delimited by
whitespace.  Even so, the last three are arguably more readable (to
humans) with the space.

I feel that for consistency leading whitespace ought explicitly be
defined as legal after all sharp dispatches *except* sharp-backslash.