[racket-dev] [racket] struct-copy with sub-types

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Mar 25 11:43:04 EDT 2011

On Fri, Mar 25, 2011 at 10:37 AM, Nadeem Abdul Hamid <nadeem at acm.org> wrote:
> Yes, those would help, though some of the syntax is off in the
> examples (copy-struct instead of struct-copy -- and the chum one is
> missing "bruce" as the struct-expr).

Yeah, I realized the errors after re-building the docs, thanks. :)

> And the keyword arguments seem a
> little clumsy... I don't suppose there's any way to have struct-copy
> automatically check supertypes of the given struct id for fields that
> are not immediately found in the sub-type?

Yeah, I don't like this either, but without the entire selector name
there, you can get confusion by trying to guess the right prefix,
especially when the struct names and field names both can have


Posted on the dev mailing list.