all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: The rest of xVARs
Date: Thu, 09 Aug 2012 10:14:27 +0400	[thread overview]
Message-ID: <50235543.3000501@yandex.ru> (raw)
In-Reply-To: <jwvlihqih7o.fsf-monnier+emacs@gnu.org>

On 08/08/2012 12:30 AM, Stefan Monnier wrote:

>> Should we also try to get rid of INTERNAL_FIELD, (B|K)VARs
>> but provide (B|K)SET macros similar to (F|W)SET?
>
> BVAR and KVAR were introduced for a different need: these fields are
> exported as Lisp vars, so they can be let-bound, and in the concurrency
> branch this will require special treatment both for reads and for writes
> (basically, while it's a single field, it can contain various values:
> one per thread).

We're very, very far from the full-featured Lisp threads; for me, even
a new GC looks simpler and more realistic :-). (I don't believe that we
will have multithreaded buffer processing in the foreseeable future,
but rather believe in a kind of implicit, i.e. invisible for Lisp,
concurrency like thread-per-buffer (sometimes) or thread-per-frame).

I can't continue without solving (B|K)VARs issue, and X = B->field/
BSET(B, field, X) is enough for my purposes; so I'm voting for doing
it so unless there is a plan to merge something from the concurrency
branch which can conflict with this. IIUC, real support for per-thread
values is not ever designed anyway.

> I dislike the current BVAR/KVAR mostly because it receives a field name
> as parameter (so it looks like a variable, while it's only a field
> name).  Maybe we can use TGET (foo->bar) and let the concurrency branch
> make the "bar" field into a different type than Lisp_Object.

So you should hate DEFUN which receives function pointer, Lisp_Subr name
and even a comment as parameters :-). I dislike it too, but consider them
as the smallest possible evil rather than a nightmare.

Dmitry




       reply	other threads:[~2012-08-09  6:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50214432.5040906@yandex.ru>
     [not found] ` <jwvlihqih7o.fsf-monnier+emacs@gnu.org>
2012-08-09  6:14   ` Dmitry Antipov [this message]
2012-08-09 12:52     ` The rest of xVARs Stefan Monnier
     [not found]       ` <5023F621.1020107@yandex.ru>
     [not found]         ` <jwvipcr7tgm.fsf-monnier+emacs@gnu.org>
2012-08-10  5:19           ` Dmitry Antipov
2012-08-10 15:18             ` Stefan Monnier

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=50235543.3000501@yandex.ru \
    --to=dmantipov@yandex.ru \
    --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 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.