From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notification
Date: Wed, 24 Feb 2016 14:52:01 +1100 [thread overview]
Message-ID: <8737silq8u.fsf@gnus.org> (raw)
In-Reply-To: <jwvbn766b58.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Tue, 23 Feb 2016 22:32:03 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> First time I see it mentioned in this context. Why/where do you use it?
I use it everywhere I want to check whether something is larger than
zero...
> The only place where it seems to make sense is in #'plusp (since
> otherwise (> x 0) is actually more concise&efficient&precise than (plusp
> x) which is my mind suffers from the annoying "is 0 positive?" issue),
> but "grep" seems to indicate that's not used anywhere within Emacs (nor
> GNU ELPA).
That's because I always change it to (if (> foo 0) ..) after first
writing (if (plusp foo) ...). :-)
Try
grep --color -nH -e "(>.*\b0\b" `find . -name '*.el'`
instead.
As for concise... sure, in characters. But not in meaning. If I'm
reading code, I'm reading "if that is bigger than... zero!" instead of
immediately getting that it's a check for positivity.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2016-02-24 3:52 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160222175244.30186.2617@vcs.savannah.gnu.org>
[not found] ` <E1aXuf6-0007rW-6h@vcs.savannah.gnu.org>
2016-02-22 18:51 ` [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notification Stefan Monnier
2016-02-22 20:41 ` Michael Albinus
2016-02-22 20:49 ` Dmitry Gutov
2016-02-22 20:50 ` Stefan Monnier
2016-02-22 21:07 ` Michael Albinus
2016-02-22 21:19 ` Stefan Monnier
2016-02-22 22:48 ` Michael Albinus
2016-02-22 23:22 ` Stefan Monnier
2016-02-22 21:39 ` Drew Adams
2016-02-22 21:42 ` Kaushal Modi
2016-02-22 22:28 ` Oleh Krehel
2016-02-22 23:15 ` Drew Adams
2016-02-23 1:05 ` John Wiegley
2016-02-23 1:58 ` Lars Ingebrigtsen
2016-02-23 2:11 ` Stefan Monnier
2016-02-23 16:41 ` John Wiegley
2016-02-23 16:50 ` Stefan Monnier
2016-02-23 17:11 ` Drew Adams
2016-02-23 22:48 ` John Wiegley
2016-02-24 1:56 ` Stefan Monnier
2016-02-24 2:00 ` John Wiegley
2016-02-24 2:50 ` Drew Adams
2016-02-24 2:17 ` Lars Ingebrigtsen
2016-02-24 3:32 ` Stefan Monnier
2016-02-24 3:52 ` Lars Ingebrigtsen [this message]
2016-02-24 3:53 ` Lars Ingebrigtsen
2016-02-24 4:09 ` Stefan Monnier
2016-02-24 4:23 ` Lars Ingebrigtsen
2016-02-24 15:18 ` Nicolas Richard
2016-02-24 15:33 ` Clément Pit--Claudel
2016-02-24 12:21 ` Dmitry Gutov
2016-02-24 15:29 ` Nicolas Richard
2016-02-24 16:51 ` Drew Adams
2016-02-24 4:08 ` Clément Pit--Claudel
2016-02-24 10:02 ` Stephen Berman
2016-02-29 6:24 ` Drew Adams
2016-02-29 7:06 ` John Wiegley
2016-02-29 15:41 ` Drew Adams
2016-02-29 19:53 ` Joost Kremers
2016-03-01 16:53 ` Richard Stallman
2016-02-29 17:15 ` Stefan Monnier
2016-02-29 18:11 ` Drew Adams
2016-02-29 18:47 ` John Wiegley
2016-02-29 19:28 ` Drew Adams
2016-02-29 20:05 ` Stefan Monnier
2016-02-29 21:19 ` Drew Adams
2016-02-29 21:57 ` Stefan Monnier
2016-02-29 22:19 ` Drew Adams
2016-03-01 16:53 ` Richard Stallman
2016-03-01 20:09 ` John Wiegley
2016-02-23 17:45 ` Richard Stallman
[not found] ` <<87r3g4js64.fsf@gmail.com>
[not found] ` <<E1aYH1b-0006nO-9u@fencepost.gnu.org>
2016-02-23 18:09 ` Drew Adams
2016-02-24 13:41 ` Richard Stallman
2016-02-22 23:29 ` Stefan Monnier
2016-02-22 23:50 ` Drew Adams
2016-02-23 17:45 ` Richard Stallman
[not found] ` <<87egc4v4hs.fsf@gmx.de>
[not found] ` <<8bd4ec21-1306-41bf-aca7-5571a3014337@default>
[not found] ` <<E1aYH1M-0006ia-SR@fencepost.gnu.org>
2016-02-23 18:05 ` Drew Adams
2016-02-24 13:41 ` Richard Stallman
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=8737silq8u.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.