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

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Tue Sep 21 17:45:01 EDT 2010

On 09/21/2010 03:36 PM, Sam Tobin-Hochstadt wrote:
> 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'.

I thought match raised an error if the static info wasn't completely known.


Posted on the users mailing list.