[r6rs-discuss] [Formal] SRFI-39 should be made an R6RS library
R. Kent Dybvig
dyb at cs.indiana.edu
Wed Feb 21 13:03:14 EST 2007
> >> I was assuming I'd use your definition unchanged.
>
> But, to repeat, here's your definition:
>
> (define-syntax parameterize
> (lambda (x)
> (syntax-case x ()
> [(_ ((x v) ...) e1 e2 ...)
> (with-syntax ([(p ...) (generate-temporaries #'(x ...))]
> [(y ...) (generate-temporaries #'(x ...))])
> #'(let ([p x] ... [y v] ...)
> (let ([swap (lambda () (let ([t (p)]) (p y) (set! y t)) ...)])
> (dynamic-wind #t swap (lambda () e1 e2 ...) swap))))])))
>
> How does it fall down?
You haven't implemented parameters in terms of your dynamic binding,
that's how. You've merely presented my own implementation of parameterize
in terms of dynamic-wind back to me and put in code the exact
implementation of make-thread-parameter that I described. In short,
you've done nothing to prove your claim that you could implement
parameters with your dynamic-binding mechanism plus thread-local storage.
Do you now admit that this claim is false?
Kent
More information about the r6rs-discuss
mailing list