[plt-dev] feature request

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Apr 14 16:59:37 EDT 2010

To help me understand the proposal: what do you get out of that, that
you don't get from prefabs? (The only difference that jumps out at me
is the the concrete syntax when these are marshalled; prefabs have a
"#s(" prefix instead of just a "(" prefix; otherwise that is the
same.)

Robby

On Wed, Apr 14, 2010 at 3:43 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> I would like to request another form of structure and I am almost willing to argue that we got #:prefab not quite right.
>
> Proposed option:
>
>  #:list
>
> It's basically like #:prefab but:
>
>  (define-struct x (a b) #:list)
>
> introduces a constructor that creates a tagged list: (make-x 10 20) = (list 'x 10 20). The selectors check for the 'x tag and extract the values from the a and b fields as usual. (x-a (make-x 10 20)) = 10. If mutability is specified you get mcons instead of cons.
>
> I think this would be highly useful for turning reading and writing S-expressions and communicating via S-expression protocols. It's kind of like "XML lite". -- Matthias
>
> p.s. With a bit more work, one could even get type guarantees in TS modules and use generative structures when they flow to untyped modules.
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev
>


Posted on the dev mailing list.