[plt-scheme] scheme/class: attaching properties to classes

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Sep 12 12:00:29 EDT 2008

On Fri, Sep 12, 2008 at 4:15 PM, Grant Rettke <grettke at acm.org> wrote:
>> I'm thinking particularly of prop:custom-write, which would let me implement
>> a to-string method.
>
> How does that work differently than sending it a "to-string" message?
> Just wondering.

The printing procedures (write, print, maybe display) will use a user
specified function to print a structure if the structure has a
prop:custom-write property.  Dave wants to extend this to objects, so
he can specify how his objects are printed, so he can uniformly print
his data (which could include objects, in addition to other types) in
his desired format.

N.


Posted on the users mailing list.