> On Jun 10, 2016, at 12:54 PM, Robby Findler <ro...@eecs.northwestern.edu> 
> wrote:
> 
> On Fri, Jun 10, 2016 at 11:51 AM, Alex Knauth <alexan...@knauth.org> wrote:
>> 
>> I was thinking of that too, but the problem is that the constructor-style 
>> printing deals with s-expressions, while the existing printer for sets deals 
>> with output ports.
> 
> Maybe we just need to implement the constructor style printing
> differently? Perhaps something that cooperates with the pretty-printer
> instead? After all, the set of things that get special printing is
> small(ish) and fixed.

The prop:constructor-style-printer could add prop:custom-write as a super 
property with a printer created with make-constructor-style-printer, and that 
would cooperate with pretty printing.

>> Where the constructor-style-printer could look for the 
>> `prop:constructor-style-printer` property and use it to get the constructor 
>> and the sub-expressions?
> 
> I don't think that it works to require something for all future structs.

Transparent structs shouldn't need this, and opaque structs that don't want to 
be seen as structs also shouldn't need this. But opaque structs that want to be 
printed properly in constructor-style mode would need this.

> Robby

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to