[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Closure?
From: |
Ludovic Courtès |
Subject: |
Re: Closure? |
Date: |
Tue, 15 Jul 2008 09:59:04 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hello,
"Neil Jerram" <address@hidden> writes:
> 2008/7/11 Kjetil S. Matheussen <address@hidden>:
>>
>> On Fri, 11 Jul 2008, Kjetil S. Matheussen wrote:
>>
>>> Ludovic Court?s:
>>> >
>>> > guile> ((lambda (a b) (the-environment)) 2 3)
>>> > (((a b) 2 3) #<eval-closure b7c6dcf8>)
>>> >
>>> > But don't do that, since the representation of environments could
>>> > eventually change.
>
>> Sorry, I misunderstood. What I ment is that (the-environment)
>> etc. is what makes Guile special. I hope there is no
>> plans to remove all that.
>
> I agree. I can't see a reason why we might want to remove
> `the-environment' and `local-eval', even if Guile's internal
> representation of environments changes, because the ideas that there
> _is_ a lexical environment inside a lambda (or a let ...), and that
> one can evaluate with respect to these environments, are absolutely
> fundamental in Scheme.
Agreed. I just said the *representation* of closures could change.
(Besides, keep in mind that `the-environment' et al. aren't
documented...)
> On the other hand, it would be unsafe (w.r.t. the future) to write
> code that depends on the current representation. If you find yourself
> doing that, better to ask for an official abstraction of whatever
> you're trying to do. (And even better to provide a patch for it!)
Agreed.
Thanks,
Ludovic.
- Re: Closure?, (continued)
- Re: Closure?, Kjetil S. Matheussen, 2008/07/11
- Re: Closure?, Neil Jerram, 2008/07/12
- Re: Closure?,
Ludovic Courtès <=
- Re: Closure?, Andy Wingo, 2008/07/16
- Re: Closure?, Ludovic Courtès, 2008/07/16
Re: Closure?, Kjetil S. Matheussen, 2008/07/14
- Re: Closure?, Maciek Godek, 2008/07/14
- Message not available