From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: The rest of xVARs Date: Thu, 09 Aug 2012 10:14:27 +0400 Message-ID: <50235543.3000501@yandex.ru> References: <50214432.5040906@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344492886 31134 80.91.229.3 (9 Aug 2012 06:14:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2012 06:14:46 +0000 (UTC) Cc: Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 09 08:14:47 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SzM15-000646-Jb for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2012 08:14:43 +0200 Original-Received: from localhost ([::1]:55718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzM14-0005eb-OH for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2012 02:14:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzM12-0005eR-G2 for emacs-devel@gnu.org; Thu, 09 Aug 2012 02:14:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzM11-0003JU-Gt for emacs-devel@gnu.org; Thu, 09 Aug 2012 02:14:40 -0400 Original-Received: from forward10.mail.yandex.net ([77.88.61.49]:37145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzM11-0003JF-57 for emacs-devel@gnu.org; Thu, 09 Aug 2012 02:14:39 -0400 Original-Received: from smtp6.mail.yandex.net (smtp6.mail.yandex.net [77.88.61.56]) by forward10.mail.yandex.net (Yandex) with ESMTP id AB0921020806; Thu, 9 Aug 2012 10:14:34 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344492874; bh=vsAmW//nmqBD94LvLzeweZaPXZL4KA463TVCF/VnmY0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=QJIaOLM/RoCk9TQn4jNgQfDxwX/CEskbuIQPyDMNW/qNwTuOs+IZv5PVCAqaXt122 yOfCYGXrMzvSEnMYhaFSmoae4tpcmVEFaTMN8wV6m8KDWIVnI3mIfo0dyKz6D0x/CQ 8tV/OYu8JNv7u1xS5eucJYdjIU6Y87awIgvH1Ckk= Original-Received: from smtp6.mail.yandex.net (localhost [127.0.0.1]) by smtp6.mail.yandex.net (Yandex) with ESMTP id 7EA451640512; Thu, 9 Aug 2012 10:14:34 +0400 (MSK) Original-Received: from 147.gprs.mts.ru (147.gprs.mts.ru [213.87.131.147]) by smtp6.mail.yandex.net (nwsmtp/Yandex) with ESMTP id EWrOu6NH-EXraesXl; Thu, 9 Aug 2012 10:14:33 +0400 X-Yandex-Rcpt-Suid: monnier@IRO.UMontreal.CA X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344492874; bh=vsAmW//nmqBD94LvLzeweZaPXZL4KA463TVCF/VnmY0=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nZpHGqxSh2syNineSt6q0SU3hNJXCJ8mJTF3gCnPCO4NfkOTSwKb/6+FLsa+kWUvU dsiAN0MguMuCc28iryWw3wbxXDDKSE2968dpuEeq72Qhnkyxcj8URHfu/MVYh4llDE o+1Yy5SV/HJnpWfRoOgkfzy6SuZMFuDvdqkLT914= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.61.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152357 Archived-At: 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