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

Reply via email to