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: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil Date: Tue, 20 Jan 2015 14:10:08 -0500 Message-ID: References: <20150119090203.4087.82062@vcs.savannah.gnu.org> <54BD1F62.8020304@dancol.org> <54BDED19.3020205@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421781030 30685 80.91.229.3 (20 Jan 2015 19:10:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2015 19:10:30 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 20 20:10:29 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 1YDeC4-0001ey-09 for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2015 20:10:28 +0100 Original-Received: from localhost ([::1]:45329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDeC3-0005Eu-Ds for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2015 14:10:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDeBp-0005Eo-5f for emacs-devel@gnu.org; Tue, 20 Jan 2015 14:10:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDeBl-0000k2-PE for emacs-devel@gnu.org; Tue, 20 Jan 2015 14:10:13 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:2217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDeBl-0000jl-M9 for emacs-devel@gnu.org; Tue, 20 Jan 2015 14:10:09 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwPAOwQflSnWBWM/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCwsOHwcSFBgNJIhKCdZZAQEBBwEBAQEekBhXBwqEPgWLAaYmhBkhgTWBQgEBAQ X-IPAS-Result: AjwPAOwQflSnWBWM/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCwsOHwcSFBgNJIhKCdZZAQEBBwEBAQEekBhXBwqEPgWLAaYmhBkhgTWBQgEBAQ X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="108301717" Original-Received: from 167-88-21-140.cpe.teksavvy.com (HELO pastel.home) ([167.88.21.140]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jan 2015 14:10:08 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 4652824B0; Tue, 20 Jan 2015 14:10:08 -0500 (EST) In-Reply-To: <54BDED19.3020205@dancol.org> (Daniel Colascione's message of "Mon, 19 Jan 2015 21:52:25 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:181486 Archived-At: > The problem with this approach is that we'll have sections of code that > exist only to account for an uncommon configuration. We don't need to keep the code for the "Qnil!=0" case, but we should limit the reliance on "Qnil==0" to a few specific places where rewriting it differently is fairly easy difficult. E.g. a few macros in lisp.h for example. > They'll bitrot, and the code will grow implicit dependencies on Qnil > being zero anyway. That'll happen any way, indeed, by accident. Just like we had places which relied on 0==make_number(0), which we've had to find the hard way (and there might still be some such places we haven't yet noticed). But if we only consciously rely on Qnil==0 in a few special places, then we're less likely to introduce such dependencies by accident all over the place. > It'll be just like GCPRO. I'd rather just declare that Qnil will always > be zero and take full advantage of the change. Regarding GCPRO, I'd be happy to get rid of them, but AFAIK they're still used on a few platforms. If we can fix those remaining platforms we can get rid of GCPRO. Stefan