> > This is nice for defining abstract types, but it can be pretty >> inconvenient for defining plain old aggregated data types that just have a >> bundle of fields. When defining those types as structs, consider using the >> #:transparent option. This means "use no inspector at all" (roughly) and >> lets `struct-info` Just Work (TM) without any inspector wrangling. The >> downside is that other modules may be able to break your type's invariants >> and possibly circumvent your contracts. > > > That's what I expected, but it doesn't seem to work: > > > (struct person (name age) #:transparent) > > (struct-info person) > #f > #t > > What am I missing? >
I was stumped on this for a while, but then realized the problem: > (struct-info person) #f #t > (struct-info (person "Alyssa P. Hacker" 42)) #<struct-type:person> #f -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

