[racket] match plus #:super structs => no nice fit?

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Sep 21 17:36:13 EDT 2010

On Tue, Sep 21, 2010 at 5:31 PM, John Clements
<clements at brinckerhoff.org> wrote:
> It looks to me like match doesn't work nicely with #:super structs.  For instance, this program:

[snip]

> It's easy to work around this, but it would be nice if it worked.  Am I missing something obvious?

I don't know if it's obvious, but `match' is relying on static
information about the fields of `b', but `struct:a' is only known
dynamically.  So at expansion time, `match' has no idea how many other
fields there might be other than the ones explicitly declared in `b'.
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.