[imp-hackers] ansi test issues

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Jul 9 14:45:59 UTC 2009


On Thu, Jul 9, 2009 at 4:02 PM, Sam Steingold<sds at gnu.org> wrote:
> E.g., consider print-level.[89]
> the text and examples in
>  http://www.lispworks.com/documentation/HyperSpec/Body/v_pr_lev.htm
> seem to indicated that
> (write-to-string #S(foo) :print-level 0)
> should return "#" and not "#S(foo)" as the tests mandate.
>
> In fact, I argue that this is a case where the test is _wrong_ as
> opposed to two possible return values being both acceptable.

You mean that the following two cases are not consistent, or that the
first one is allowed both to be # or #S(FOO) ?

> (defstruct foo)
> (let ((*print-level* 0)) (write-to-string #S(foo)))
"#S(FOO)"
> (defstruct foo a b)
> (let ((*print-level* 0)) (write-to-string #S(foo)))
"#"

Probably the question is when is a structure understood to have
elements and be a composed object and when not.  I see CLISP prints #
in the first case, ECL and SBCL print #S(FOO).

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the implementation-hackers mailing list