all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Colascione <dancol@dancol.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil
Date: Tue, 20 Jan 2015 14:10:08 -0500	[thread overview]
Message-ID: <jwvoapte0ju.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <54BDED19.3020205@dancol.org> (Daniel Colascione's message of "Mon, 19 Jan 2015 21:52:25 -0800")

> 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



  reply	other threads:[~2015-01-20 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150119090203.4087.82062@vcs.savannah.gnu.org>
     [not found] ` <E1YD8Dj-00014b-6G@vcs.savannah.gnu.org>
2015-01-19 14:33   ` [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil Stefan Monnier
2015-01-19 15:14     ` Daniel Colascione
2015-01-20  4:37       ` Stefan Monnier
2015-01-20  5:52         ` Daniel Colascione
2015-01-20 19:10           ` Stefan Monnier [this message]
2015-01-20 22:00             ` Paul Eggert
2015-01-21 15:31               ` Stefan Monnier
2015-01-22  4:09                 ` Paul Eggert
2015-01-20  1:18     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvoapte0ju.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.