At Fri, 12 May 2017 13:38:44 -0300, Gustavo Massaccesi wrote:
> I always thought it was strange that mutable pairs can’t be
> chaperoned, but boxes and vectors of length 2 can. Moreover, there was
> (is?) a plan to replace the implementation of mcons with structs. Does
> #:authentic make this more consistent / efficient?

Yes: with `#:authentic`, mutable pairs could be implemented as structs
and continue to be uncooperative while avoiding an extra check in
`mpair?`. (I think we'd more likely want to take advantage of structs
to get chaperones for mutable pairs, though.)

> Also, what would happen in an alternative word where all the structs
> were #:authentic by default and chaperones/impersonators must be
> explicitly allowed with some keyword like #:chaperonable?

The author of a library that exposes a structure type would have to
think harder about whether chaperones/impersonators should be allowed
--- which I think would mean almost always remembering to add
`#:chaperonable`.

It's awkward to need `#:authentic` in one context or `#:chaperonable`
in the other, but favoring cooperation via chaperones (and therefore
contracts) seems like a better default to me.

-- 
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/20170512170831.7FD43650091%40mail-svr1.cs.utah.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to