Summary

read/write invariance on symbols consisting of digits

Metadata

Description

 (symbol->string
  (with-input-from-string
   (with-output-to-string
    (lambda ()
     (write (string->symbol "3"))))
   read))
 
 Error: (symbol->string) bad argument type - not a symbol: 3

because the 3 is read as a number. In other words, (string->symbol "3") should return |3| not 3. It works fine for floating point numbers, though.

 #;11> (string->symbol "1.3")
 |1.3|
 #;12> (string->symbol "3")
 3

Changes and comments

[2010-08-13 10:06:01 UTC] felix changed status from new to closed

[2010-08-13 10:06:01 UTC] felix set resolution to fixed

[2011-04-04 08:31:00 UTC] felix removed milestone 4.6.0

[2011-04-04 08:31:00 UTC] felix wrote:

Milestone 4.6.0 deleted