From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is it time to remove INTERNAL_FIELD? Date: Thu, 23 Apr 2015 16:53:38 +0300 Message-ID: <83iocn0x3x.fsf@gnu.org> References: <87lhhjuq26.fsf@gmail.com> <87fv7r3rbh.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429797251 9951 80.91.229.3 (23 Apr 2015 13:54:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 13:54:11 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 23 15:53:58 2015 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 1YlHZm-0006Cq-2E for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 15:53:58 +0200 Original-Received: from localhost ([::1]:40420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlHZl-0002gy-Bp for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 09:53:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlHZY-0002gm-3r for emacs-devel@gnu.org; Thu, 23 Apr 2015 09:53:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlHZT-00041I-15 for emacs-devel@gnu.org; Thu, 23 Apr 2015 09:53:44 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:53710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlHZS-00040p-Oo for emacs-devel@gnu.org; Thu, 23 Apr 2015 09:53:38 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NN900B00IC01Q00@mtaout26.012.net.il> for emacs-devel@gnu.org; Thu, 23 Apr 2015 16:55:12 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NN900O2NINZV2B0@mtaout26.012.net.il>; Thu, 23 Apr 2015 16:55:12 +0300 (IDT) In-reply-to: <87fv7r3rbh.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 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:185814 Archived-At: > From: Oleh Krehel > Date: Thu, 23 Apr 2015 15:30:26 +0200 > Cc: emacs-devel@gnu.org > > we should remove the macros that don't do anything. What this macro does is allow you to use field names like 'foo', when the field is really called 'foo_'. I think it's okay to remove INTERNAL_FIELD, but I think we should keep the trailing underscore appended in BVAR and KVAR. That's how all this started: the fields were renamed to have a trailing underscore so that code that used foo->bar instead of BVAR (foo, bar) would be immediately flagged by the compiler. > As for accidental access, I'm sure these rare errors will be caught by > the code review / test suite. We don't want to rely on code reviews, since they are very informal and their coverage is too low to be efficient. Based on bitter past experience with similar errors that lay low for months, sometimes for years, I'd rather not give up those underscores in BVAR and KVAR, which means the struct fields should retain them.