From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>, Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Info: No GIL Multithreading strat for Python
Date: Mon, 04 Mar 2024 19:30:32 +0300 [thread overview]
Message-ID: <cc12822852d8bb547809e25fd875d390a9a7bd35.camel@yandex.ru> (raw)
In-Reply-To: <86r0gqmajp.fsf@gnu.org>
On Mon, 2024-03-04 at 14:44 +0200, Eli Zaretskii wrote:
> > From: Arthur Miller <arthur.miller@live.com>
> > Lisp programs
> > can modify, introduce and remove shared state, and that is what
> > they do all the
> > time; and so can Python programs. I am not sure I following;
> > honestly, I am
> > probably thinking of something different than you there.
>
> In Emacs, we have the current buffer and the selected window, and all
> of the global variables and symbols that exist in Emacs from the
> get-go. A Lisp program cannot remove that state.
I'd like to just point out that a state that a program does not use is
not interesting in context of the comparison to Python. Python too has
an unsolicited global state a program may modify. In a module with no
imports you have __name__, __doc__, __builtins__… And you can modify
all of that.
What matters though is whether the code accesses that. An ELisp program
`(print "hello")` does not access anything, so buffers and stuff being
available doesn't matter.
P.S.: I sometimes wish Emacs had more functions avoiding mutating the
state. E.g. there's a frequent pattern of checking a regexp and
indentation at previous line, and every time it has to be wrapped to a
`(save-excursion …`, because you have to `(forward-line -1)`.
next prev parent reply other threads:[~2024-03-04 16:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-03 11:50 Info: No GIL Multithreading strat for Python Arthur Miller
2024-03-03 15:56 ` Eli Zaretskii
2024-03-03 19:01 ` Arthur Miller
2024-03-03 19:32 ` Eli Zaretskii
2024-03-04 12:19 ` Arthur Miller
2024-03-04 12:44 ` Eli Zaretskii
2024-03-04 15:55 ` Arthur Miller
2024-03-04 16:30 ` Konstantin Kharlamov [this message]
2024-03-04 16:50 ` Eli Zaretskii
2024-03-05 0:44 ` chad
2024-03-05 0:44 ` chad
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc12822852d8bb547809e25fd875d390a9a7bd35.camel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=arthur.miller@live.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.