[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] local-eval, local-compile, and the-environment (v3)
From: |
David Kastrup |
Subject: |
Re: [PATCH] local-eval, local-compile, and the-environment (v3) |
Date: |
Sun, 15 Jan 2012 20:24:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Mark H Weaver <address@hidden> writes:
> David Kastrup <address@hidden> writes:
>
>> What is confusing here? "Obviously, definitions made in the scope of
>> local-eval can't retroactively affect the environment where
>> the-environment was called." And now instead of continuing with the
>> unfriendly "For this reason, they are prohibited." we continue with
>> "You may consider the local-eval body as being wrapped inside of an
>> implicit (let () ...)."
>
> If you want to include local definitions, then you'll need to wrap the
> form passed to `local-eval' within (begin ...) anyway. If you're
> doing that, why not just wrap them in (let () ...) instead? Is it
> really more work to type #`(let () #,@forms) than #`(begin #,@forms) ?
That is embarrassingly correct. I was thinking "body" here instead of
"form". Obviously, being able to evaluate a single _defining_ form in
its own implicit (let () ...) context is quite useless since there is no
way to subsequently use that definition.
(cons* 'let '() body) is more complex than (cons 'begin body), but not
all that much.
> You are suggesting that we wrap the expression within a (let () ...),
> for the dubious benefit of allowing you to wrap the local forms in
> (begin ...) instead of (let () ...).
Are there even situations where you could put definitions after begin?
How are they different from the situation where you can't?
> I don't see any compelling benefit to this. On the other hand, I see
> less elegant semantics and potential confusion among users, who might
> reasonably expect the definitions in their (begin ...) to be added to
> the implicit `letrec', as would happen if the (begin ...) were put in
> place of (the-environment).
begin can start with definitions, but not always? But (let () ...) can?
Scheme is weird.
--
David Kastrup
- [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3),
David Kastrup <=
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/15
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/16
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/16
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/16
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/16
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), Mark H Weaver, 2012/01/16
- Re: [PATCH] local-eval, local-compile, and the-environment (v3), David Kastrup, 2012/01/16