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 racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-dev@googlegroups.com.
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.

Reply via email to