Hello Guilers, it seems that currently there's no way to 'read' back an '*unspecified*' value, but in some cases such a feature might be handy. Here's the description of the problem; a patch is attached as well. To be more specific, this expression fails in GNU Guile 2.0.9 and 2.1.0.455-73f61-dirty (which I compiled from the master branch): --8<---------------cut here---------------start------------->8--- (read (open-input-string (object->string *unspecified*))) -| ERROR: In procedure read: -| ERROR: In procedure scm_lreadr: #:1:3: Unknown # object: #\< -| -| Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. --8<---------------cut here---------------end--------------->8--- I faced with this problem when tried to 'read' back a vector returned by 'make-vector' with the default filling (that are '*unspecified*' values). Looking through the Guile sources I found that one could fix a problem with reading of a (custom) object using 'read-hash-extend' procedure. But alas -- the problem, again, that I cannot return an unspecified value from my Guile reader callback because 'scm_read_sharp' from 'libguile/read.c' considers such a value as an indication that the procedure is unable to read an object. With that said, I think the fix could be pretty simple -- we could return a multiple values object from the Guile reader callback in the case when we need to 'read' an unspecified value where the 2nd value could indicate whether the returned unspecified value is *the* value or an indication that we could not read the value. As far as I understand, this solution is backward compatible so current callbacks will work as usual. As an example: --8<---------------cut here---------------start------------->8--- (read-hash-extend #\< (lambda (c port) (let ((str "") (pending 0) (c (read-char port))) (while (not (and (char=? c #\>) (= pending 0))) (and (char=? c #\<) (set! pending (1+ pending))) (and (char=? c #\>) (set! pending (1- pending))) (set! str (string-append str (string c))) (set! c (read-char port))) (if (string=? str "unspecified") (values *unspecified* #t) *unspecified*)))) (define (read-string str) (read (open-input-string str))) (write (read-string (object->string (make-vector 2)))) ;; => #(# #) (write (read-string (object->string *unspecified*))) ;; => # --8<---------------cut here---------------end--------------->8--- As I said, the patch is attached. I'd love to hear any comments on the patch, especially given that this patch is my first attempt to make a contribution to GNU Guile. Thanks, - Artyom -- Artyom V. Poptsov ; GPG Key: 0898A02F Home page: http://poptsov-artyom.narod.ru/