Using `struct/c` or `struct/dc` would work only with flat contracts for the fields.
At Thu, 11 May 2017 16:11:59 +0000, Jay McCarthy wrote: > This means that trying to contract them will fail or that it will default > back to just protecting the underlying functions? > > Jay > > On Thu, May 11, 2017 at 11:16 AM Matthew Flatt <[email protected]> wrote: > > > There are many structure types that are private to some library (such > > as the expander) and will never have impersonators. The compiler can't > > know that, though, and the possibility of an impersonator means that > > the structure type's predicate has to be twice as expensive. Field > > selection is also more expensive in certain cases. I'm not sure about > > the current Racket VM, but the cost is measurable when running the > > Racket expander on Chez Scheme. > > > > So, I'm thinking of adding a `prop:authentic` structure type property > > --- with an `#:authentic` shorthand for `struct` --- that prevents > > instances of a structure type from being impersonated or chaperoned. > > Naturally, an authentic structure type's supertype and subtypes must > > also be authentic. > > > > Any opinions? > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Racket Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/racket-dev/59148060.14da620a.a334b.158bSMTPIN > _ADDED_MISSING%40gmr-mx.google.com > > . > > For more options, visit https://groups.google.com/d/optout. > > > -- > -=[ Jay McCarthy http://jeapostrophe.github.io ]=- > -=[ Associate Professor PLT @ CS @ UMass Lowell ]=- > -=[ Moses 1:33: And worlds without number have I created; ]=- -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/20170511162035.A6785650081%40mail-svr1.cs.utah.edu. For more options, visit https://groups.google.com/d/optout.
