[plt-scheme] toString equivalent

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Aug 12 10:55:54 EDT 2008

Hi Dave,

As far as I know there is no equivalent to toString.  I.e. no method
that the printer will call to display an object.  As you note,
attaching a prop:custom-write property is the way to go about this,
but I don't know how one can attach properties to objects.  Objects
are just structures, so it should be possible, but I don't think the
class system exposes any way to do this.  Perhaps Robby, who I believe
develops the class system, can answer this.


On Sat, Aug 9, 2008 at 2:05 PM, Dave Gurnell <d.j.gurnell at gmail.com> wrote:
> Hi PLTers,
> I want a way to override the default way objects of a certain class get
> printed. Is there any equivalent of Java's toString method in the PLT class
> system? Alternatively, can I attach a prop:custom-write to a class, or is
> there some way of customising the default printer?
> Cheers,
> -- Dave
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.