unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Kjetil S. Matheussen" <k.s.matheussen@notam02.no>
Cc: guile-user@gnu.org
Subject: Re: Closure?
Date: Sat, 12 Jul 2008 23:43:43 +0100	[thread overview]
Message-ID: <49dd78620807121543l3de15e61lc5777c6bd2b628f1@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0807111945470.14427@notam02.uio.no>

2008/7/11 Kjetil S. Matheussen <k.s.matheussen@notam02.no>:
>
> 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.

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!)

For example, I see no problem with Kjetil's add-var-to-environment,
because it doesn't depend on the representation.

       Neil




  parent reply	other threads:[~2008-07-12 22:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cmu-lmtpd-26382-1215792454-10@mail-imap1.uio.no>
2008-07-11 17:42 ` Closure? Kjetil S. Matheussen
2008-07-11 17:47   ` Closure? Kjetil S. Matheussen
2008-07-11 20:54     ` Closure? Maciek Godek
2008-07-12 11:47       ` Closure? Kjetil S. Matheussen
2008-07-13  6:59         ` Closure? Maciek Godek
2008-07-12 22:43     ` Neil Jerram [this message]
2008-07-15  7:59       ` Closure? Ludovic Courtès
2008-07-15  9:11         ` Closure? Andy Wingo
2008-07-16 16:42           ` Closure? Ludovic Courtès
     [not found] <cmu-lmtpd-15105-1216051603-3@mail-imap1.uio.no>
2008-07-14 16:30 ` Closure? Kjetil S. Matheussen
2008-07-14 21:14   ` Closure? Maciek Godek
     [not found]   ` <e2ceda030807141414i5acef7d1h37d12d14e01cc1d@mail.gmail.com>
2008-07-14 21:41     ` Closure? Kjetil S. Matheussen
2008-07-14 22:46       ` Closure? Maciek Godek
2008-07-11 14:48 Closure? Maciek Godek
2008-07-11 15:01 ` Closure? Ludovic Courtès
2008-07-11 15:32   ` Closure? Maciek Godek
2008-07-12 22:57 ` Closure? Neil Jerram
2008-07-13  6:57   ` Closure? Maciek Godek
2008-07-13 22:56     ` Closure? Neil Jerram
2008-07-14  1:15       ` Closure? Maciek Godek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49dd78620807121543l3de15e61lc5777c6bd2b628f1@mail.gmail.com \
    --to=neiljerram@googlemail.com \
    --cc=guile-user@gnu.org \
    --cc=k.s.matheussen@notam02.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).