Subject: Re: Name for the set of characters legal in identifiers
From: Erik Naggum <erik@naggum.no>
Date: 14 Jan 2004 21:36:55 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3283105015922595KL2065E@naggum.no>

* james anderson
| the hypothesis was that the constituent traits as set out in the
| table on standard and semi-standard characters, which traits are not
| supposed to be clobbered by set-syntax-from-char, would be useful to
| characterise the set of characters which could be used in symbol
| names without explicit escaping.

  That does not appear to be an unreasonable hypothesis, but it was
  not the hypothesis you tested.  You tested whether a string of three
  characters, varying the middle one, would be read as a symbol or
  would signal an error.  Any number of middle characters that cause a
  termination of the reader algorithm will produce a symbol read from
  the first character, a letter.

| i would have expected the same status as that for #\: to apply to
| whitespace characters and to rubout.

  But (read-from-string "a b") will return a symbol, namely A, when
  the constituent trait of the space is /invalid/.  You did not test
  the length or any other property of the symbol-name of the returned
  symbol, only that it did not error.  The secondary value returned
  from READ-FROM-STRING should be educational.

-- 
Erik Naggum | Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.