[plt-scheme] Inspectors in mzscheme

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu Jan 22 10:11:11 EST 2004

At Thu, 22 Jan 2004 09:51:51 -0500, "Richard C. Cobbe" wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Lo, on Wednesday, January 21, Guillaume Marceau did write:
> 
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> > 
> > 
> > The following code does not behaves the same under drscheme and mzscheme
> > with respect to inspectors:
> > 
> >    (define-struct loc (x y) (make-inspector))
> >    (display (format "~a~n" (make-loc 4 5)))
> > 
> > Under mzscheme, it prints the opaque value:
> >     #<struct:loc>
> > 
> > Under drscheme, it prints the open value:
> >     #(struct:loc 4 5)
> > 
> > I'm not sure I understand why there is a difference.
> > Is it possible to get the open value behavior under mzscheme?
> 
> Yes; simply set the value of the print-struct parameter to #t.  (I'm not
> sure exactly what Robby's referring to; I got the same behavior that you
> did with a CVS build from 16 Jan.)

Sorry - there was a bug in earlier versions where the drscheme repl
used a more powerful inspector than was available to the program. I got
confused.

Anyways, I've just committed a change so that DrScheme doesn't change
the value of print-struct parameter anymore, so it matches mz now.

Robby


Posted on the users mailing list.