[racket-dev] Transparent Structures in XML Library

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Mon Oct 3 18:01:18 EDT 2011

The fact that transparent structures also print all of their element - in
this case recursively, ad nauseam - is more of a side effect. In that case,
I think prop:custom-write properties should be added. I assume any of the
print limiting options in my case still walk the entire structure and create
a several tens of megabytes long string just to truncate it.

On Mon, Oct 3, 2011 at 3:52 PM, John Clements <clements at brinckerhoff.org>wrote:

>
> On Oct 3, 2011, at 2:13 PM, Doug Williams wrote:
>
> > There are ways around it like that. For example, I'm trying to get in the
> habit of using ~.s in printf's where it might occur. But, I think it would
> be easy in this case to just fix the real problem.
>
> I don't think I would agree that #:transparent is the problem here;
> #:transparent means "yes, anyone can use the reflective properties to
> discover how many fields this structure has, what the mutators are, etc."
>  It's not fundamentally about printing.
>
> So I think that a separate control on printing is definitely the right way
> to go, and in particular, the ~.s choice seems like it might just solve the
> problem completely.
>
> No?
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20111003/b88e2475/attachment.html>

Posted on the dev mailing list.