From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#12215: CSET is unnecessarily confusing Date: Wed, 22 Aug 2012 09:35:24 -0700 Organization: UCLA Computer Science Department Message-ID: <50350A4C.5050103@cs.ucla.edu> References: <502D8A95.7060609@cs.ucla.edu> <5034511B.7010409@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345653404 11130 80.91.229.3 (22 Aug 2012 16:36:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 16:36:44 +0000 (UTC) Cc: Dmitry Antipov , 12215@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 18:36:44 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1T4Dv9-00058w-T7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 18:36:44 +0200 Original-Received: from localhost ([::1]:40233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Dv8-0007Q6-6I for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 12:36:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Dv5-0007Jj-1k for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:36:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4Dv3-0002w2-MN for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:36:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Dv3-0002vw-IL for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:36:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T4DvS-0003QJ-C1 for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Aug 2012 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12215 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12215-submit@debbugs.gnu.org id=B12215.134565336513086 (code B ref 12215); Wed, 22 Aug 2012 16:37:02 +0000 Original-Received: (at 12215) by debbugs.gnu.org; 22 Aug 2012 16:36:05 +0000 Original-Received: from localhost ([127.0.0.1]:43612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4DuS-0003Og-Ow for submit@debbugs.gnu.org; Wed, 22 Aug 2012 12:36:05 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52870) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4DuM-0003OU-PU for 12215@debbugs.gnu.org; Wed, 22 Aug 2012 12:35:59 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C0001A60002; Wed, 22 Aug 2012 09:35:28 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53HrOHQ8lYIk; Wed, 22 Aug 2012 09:35:28 -0700 (PDT) Original-Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3C5D7A60001; Wed, 22 Aug 2012 09:35:28 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63399 Archived-At: On 08/22/2012 06:27 AM, Stefan Monnier wrote: >> That does avoid the ambiguity but it's pretty weird. > Less weird than CSET (XCHAR_TABLE (char_table), parent, parent), > and avoids the duplication of code we have with set_char_table_foobar. True in both cases. I suppose the notation could grow on one. A few other thoughts. First, why would we need multiple setter macros (CSET, BSET, etc.)? Why can't we have just one macro? That is, why does CSET (P, .FIELD, VAL) care what P's type is? Surely one generic macro will do. Second, why does the setter need the pointer to the start of the object, as well as a pointer to the field that's changing? Doesn't the latter suffice in a copying collector? That is, why can't we just turn this into something like: fset (&XCHAR_TABLE (char_table)->parent, parent); ? That's shorter and simpler and avoids the need for a macro. Third, I agree with Stefan that it'd be reasonable to put all this setter stuff into a branch, and I'll volunteer to do that (i.e., change back to plain assignments in the trunk, and create a new branch called "gc" or whatever). But I recall that Dmitry had serious qualms about that so I would like to hear his opinion.