[plt-dev] feature request

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Wed Apr 14 16:47:48 EDT 2010

On 04/14/2010 02:43 PM, Matthias Felleisen 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.
>
>    

Unrelated, but as long as we are asking for feature requests I would 
like some smoother upgrade path between structs and classes. The struct 
syntax is very nice for creating objects that store data so I like to 
use that rather than starting with classes, but once I decide a struct 
should be used in an OO model then I have to rewrite a lot of code.

I have no formal proposal yet, but if anyone has ideas about it I would 
be interested.


Posted on the dev mailing list.