unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joel Reicher <joel.reicher@gmail.com>
To: Michael Heerdegen via "Emacs development discussions."
	<emacs-devel@gnu.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Re: Commands, term "closure" and online help
Date: Sun, 14 Jul 2024 16:20:47 +1000	[thread overview]
Message-ID: <86h6cs1olc.fsf@gmail.com> (raw)
In-Reply-To: <87sewcplet.fsf@web.de> (Michael Heerdegen via's message of "Sun,  14 Jul 2024 07:55:38 +0200")

Michael Heerdegen via "Emacs development discussions." 
<emacs-devel@gnu.org> writes:

> Joel Reicher <joel.reicher@gmail.com> writes:
>
>>> Ah, now you are talking!  Indeed, functions defined with C-x 
>>> C-e are described as closures.  What would you like to see 
>>> instead?  interpreted-function, perhaps?
>
>> Perhaps "dynamically ..." rather than "interpreted"? That word 
>> is used in the part of the elisp manual that describes defun 
>> also. Something like "dynamically generated function" or 
>> "dynamically defined function"?
>
> Aren't "dynamically defined functions" bytecode functions when 
> running compiled code?  So this would not be a better term.

Which bit of the documentation are you thinking of? I can't find 
that phrase with reference to bytecode.

> AFAIU we want to tell that these functions will, when funcalled, 
> be handled by the interpreter - thus, are interpreted functions 
> in that sense.

My understanding is that the closure is constructed the moment the 
defun (et al) is done, regardless of whether the function is ever 
called.

I'm not familiar with the implementation details but it looks to 
me from a trivial test this happens unconditionally; even when the 
function being defined does not capture anything from its 
enclosing scope...

(defun blah ())

C-x C-e and then C-h f blah to see what I mean. (Maybe this gets 
optimised later?)

That's one of the reasons I think it might be helpful to refer to 
this simply as a function that is "dynamically created", or some 
variation on that.

Regards,

        - Joel



  reply	other threads:[~2024-07-14  6:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 14:51 Commands, term "closure" and online help T.V Raman
2024-04-15 14:56 ` Eli Zaretskii
2024-04-15 15:09   ` Eli Zaretskii
2024-04-15 15:49     ` T.V Raman
2024-04-15 16:17       ` Eli Zaretskii
2024-07-14  5:06         ` Joel Reicher
2024-07-14  5:55           ` Michael Heerdegen via Emacs development discussions.
2024-07-14  6:20             ` Joel Reicher [this message]
2024-07-14  7:29               ` Michael Heerdegen via Emacs development discussions.
2024-07-14  8:48                 ` Joel Reicher
2024-07-14 10:36                   ` Michael Heerdegen

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=86h6cs1olc.fsf@gmail.com \
    --to=joel.reicher@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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).