[plt-dev] overriding constructor style printing

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 3 17:38:57 EST 2009

At Tue, 3 Mar 2009 17:17:16 -0500, Felix Klock's PLT scheme proxy wrote:
> I do not want to expose the internal structure at all; I want an  
> abstract view of the fields it contains.  In general, the designer of  
> an abstract data type wants to only provide an abstract view of that  
> type.  Sometimes that goal conflicts with constructor-style printing,  
> but not always.

My initial response to your earlier message was: Probably print-convert
needs to recognize a property that gives you more control over the
conversion, much like `prop:custom-write' gives you control over
`write' and `display' output.

So, that was probably the right answer after all, since the limited
property that's already available doesn't work well enough.

I can add that property. Meanwhile, I don't have an answer that works
with the current version.



Posted on the dev mailing list.