unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Lexical environment for functions?
Date: Sun, 28 Dec 2014 07:40:59 +0100	[thread overview]
Message-ID: <87d2742s5g.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvppb4fxg4.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 27 Dec 2014 19:10:09 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Does that mean that lexical environments exist only for value cells?
>
> Yes, at least for the "native" lexical binding.
>
>> Because it would seem convenient, if one has some
>> Lisp-like presentation of a parse tree like XML, to just eval it with a
>> number of function bindings in place.
>
> Just like you could simulate the new (eval E ENV) form via
> (eval `(lexical-let ,ENV ,E)), you can do the above with
> (eval `(cl-flet FENV E)).

cl-flet is optimized for compilation rather that interpretation.  So
this is not likely to make eval a good idea for fast interpretation of
parsed expressions.

-- 
David Kastrup



      reply	other threads:[~2014-12-28  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 17:11 Lexical environment for functions? David Kastrup
2014-12-28  0:10 ` Stefan Monnier
2014-12-28  6:40   ` David Kastrup [this message]

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/emacs/

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

  git send-email \
    --in-reply-to=87d2742s5g.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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