emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2bb0703 1/2: lisp/*.el: Force non-nil result to t, to match d


From: Juanma Barranquero
Subject: Re: master 2bb0703 1/2: lisp/*.el: Force non-nil result to t, to match docstring
Date: Thu, 17 Oct 2019 20:18:15 +0200

On Thu, Oct 17, 2019 at 8:02 PM Stefan Monnier <address@hidden> wrote:
>
> Just to be clear: this is a typical bikeshed subject.

Definitely.

> So far, AFAIK most of the code and docstrings use nil/non-nil, AFAICT
> (which is why we're all familiar with the notion of "non-nil" as
> a matter of fact) and as a maintainer I've made an effort to try and
> standardize on this, e.g. by fixing docstrings which overspecified the
> return value to `t`.  

There's a cascading effect. Some functions with multiple non-nil return values rely on other functions's declared boolean result to construct their own. So I think functions that can only return a boolean are not "overspecified" by saying so. YMMV.

> The most important thing is to try and choose one and stick to it, both
> for the benefit of consistency and to avoid back-and-forth
> cosmetic changes.

FWIW, I don't consider making a function return what its docstring says "a cosmetic change". 

reply via email to

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