emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notificati


From: Lars Ingebrigtsen
Subject: Re: [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notification
Date: Wed, 24 Feb 2016 14:52:01 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Monnier <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]