[plt-scheme] Resources in the transformer environment
On Fri, 27 Oct 2006 08:13:22 0800, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> Would it make sense to have a form like
>
> (with-database
> "host.domain.foo" 3306 "my_username" "my_password" "my_schema"
> <body>)
>
> that opened the database both a compile time and at run time? The macro
> might be implemented as mostly
>
> (dynamic-wind
> (lambda () <...open the database...>)
> (lambda () ... (local-expand <body> ...) ...)
> (lambda () <...close the database...>))
>
> but the expansion of <body> would also be wrapped with a similar
> `dynamic-wind' to perform the same DB open and close.
Yes. This is exactly the sort of thing I was looking for. Thanks, Matthew.
-Jon
>
>
> Matthew
>
>