We created the continuation-mark-key data type in ~2011 to support Typed
Racket. At that point, Racket had continuation mark support for more than a
decade using other values as keys.

Sam

On Sat, Jan 11, 2020, 11:37 PM Jack Firth <jackhfi...@gmail.com> wrote:

> That makes sense. I think the thing that seems most confusing to me is
> that using the continuation-mark-key data type is *optional*. Why bother
> allowing arbitrary kinds of keys?
>
> On Saturday, January 11, 2020 at 8:02:44 PM UTC-8, Matthew Flatt wrote:
>>
>> It would be reasonable to generalize `chaperone-continuation-mark-key`
>> to apply in cases where `chaperone-struct` could work, with similar
>> sorts of evidence that chaperoning is allowed provided by a caller of
>> `chaperone-continuation-mark-key`. I guess we just didn't think about
>> it that way when `chaperone-continuation-mark-key` was added, so it was
>> added in a way more like `chaperone-vector` and other chaperones that
>> apply to more specialized representations.
>>
>> Other kinds of keys, like symbols, can't be impersonated because their
>> representations don't accommodate chaperones. (In other words, they're
>> like structs declared with `#:authentic`.)
>>
>> At Sat, 11 Jan 2020 19:48:17 -0800 (PST), Jack Firth wrote:
>> > Based on my reading of Continuation Frames and Marks
>> > <
>> https://docs.racket-lang.org/reference/eval-model.html#(part._mark-model)>,
>>
>> > any value at all can be used as a key for a continuation mark. So why
>> does
>> > make-continuation-mark-key
>> > <
>> https://docs.racket-lang.org/reference/contmarks.html#%28def._%28%28quote._~23
>> > ~25kernel%29._make-continuation-mark-key%29%29>
>> > exist, and why is there a special continuation-mark-key
>> > <
>> https://docs.racket-lang.org/reference/contmarks.html#%28def._%28%28quote._~23
>> > ~25kernel%29._continuation-mark-key~3f%29%29>
>> > data type? Couldn't you use any arbitrary gensym, or a singleton
>> struct?
>> > The docs for make-continuation-mark-key mention that the returned key
>> can
>> > be impersonated and other kinds of keys can't, but they don't explain
>> why
>> > that would be the case.
>> >
>> > --
>> > 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 racket...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/racket-users/773a2caa-d6b3-48b8-becf-cc3105a6
>> > 60e0%40googlegroups.com.
>>
> --
> 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 racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/9ac7e680-f32e-4a79-8cb7-4799ea5e953c%40googlegroups.com
> <https://groups.google.com/d/msgid/racket-users/9ac7e680-f32e-4a79-8cb7-4799ea5e953c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYaGvX2ohTsK3snkaXR4t%3DJ4pHOD6E_KO33GmJBbJ%3DBqQ%40mail.gmail.com.

Reply via email to