From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Patch for fields of `struct buffer' Date: Mon, 31 Jan 2011 10:22:41 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296489242 20678 80.91.229.12 (31 Jan 2011 15:54:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 15:54:02 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 16:53:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjw4j-0007GK-T9 for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 16:53:58 +0100 Original-Received: from localhost ([127.0.0.1]:40673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjvtt-0001w6-2L for ged-emacs-devel@m.gmane.org; Mon, 31 Jan 2011 10:42:45 -0500 Original-Received: from [140.186.70.92] (port=49858 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjvaW-0007Mt-JS for emacs-devel@gnu.org; Mon, 31 Jan 2011 10:22:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjvaV-000270-Bu for emacs-devel@gnu.org; Mon, 31 Jan 2011 10:22:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:36775 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjvaV-00026l-9N; Mon, 31 Jan 2011 10:22:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAK9iRk1MCpTp/2dsb2JhbACkd3S9KoVOBIUTj2g X-IronPort-AV: E=Sophos;i="4.60,404,1291611600"; d="scan'208";a="89945962" Original-Received: from 76-10-148-233.dsl.teksavvy.com (HELO ceviche.home) ([76.10.148.233]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 31 Jan 2011 10:22:41 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id A6627660DC; Mon, 31 Jan 2011 10:22:41 -0500 (EST) In-Reply-To: (Tom Tromey's message of "Mon, 31 Jan 2011 07:29:06 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135313 Archived-At: > One easy one is whether a new thread should inherit thread-local > bindings from its parent thread. Our initial implementation did > inherit, but later I found out that this is not common in the Lisp > world. > I.E., what should this display? > (defvar var 0) > (let ((var 1)) > (run-in-thread (lambda () (message "%d" var)))) I think any choice is acceptable, from a semantics point of view. Maybe one of the two choices is "superior" in some sense, but it's not clear which, and I doubt it matters much. So I think the option that leads to the cleaner code (ideally, both for the current code, and for any foreseeable alternative implementation we decide to use in some distant future) should be preferred. Stefan