[plt-scheme] Continuation marks question

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat May 12 22:32:47 EDT 2007

My thought would be that it would depend on what libraries you want
the web programmer to be able to use. Maybe worth looking at some of
them and seeing what parameters they use.


On 5/12/07, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> So, I decided to go with the approach Robby mentioned. I've got a
> special key and when I rewrite the code, I record the cm-key and the
> cm-value and then reinstitute it. (I realized that it doesn't matter
> about marks introduced by other modules, because the only ways they
> would be in one of my continuations is if one of my lambdas was used
> in a higher-order way, which I already disallow.)
> Now the problem I'm having now. This works great for normal
> continuation marks, such as the following "simple parameters":
>   (define (make-simple-parameter-lookup id)
>     (lambda ()
>       (let ([cur
>              (continuation-mark-set->list
>               (current-continuation-marks)
>               id)])
>         (if (null? cur)
>             (error 'simple-parameter "~S Not defined in context!" id)
>             (car cur)))))
>   (define (simple-parameterize id v bt)
>     (with-continuation-mark id v (bt)))
> However, with actual parameters, they use the `parameterization' data
> structure. These are not serializable, and they probably shouldn't be
> given the thread-state properties. However, if you only use parameters
> with parameterize, then it seems safe to implement them like my
> simple-parameters.
> As a general question to the PLT community, in the serializable web
> language, should I hijack the parameter methods and syntax, or come up
> with some new name, that you will have to use when writing programs
> with serializable parameter values?
> Jay
> ps If not obvious, I'm updating Pettyjohn's prototype. With this last
> step, I am supporting the entire PLT kernel syntax, so I think almost
> any servlet will work without modification, excepting the use of
> call/cc in the context of higher order functions.
> --
> Jay McCarthy <jay.mccarthy at gmail.com>
> http://jay.teammccarthy.org
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.