emacs-devel
[Top][All Lists]
Advanced

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

Re: master a6b5985: Avoid duplicated character classes in rx


From: Adam Porter
Subject: Re: master a6b5985: Avoid duplicated character classes in rx
Date: Mon, 09 Dec 2019 21:27:54 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

> On Fri, Dec 6, 2019 at 8:47 PM Drew Adams <address@hidden> wrote:
>
>> FWIW, I disagree that it's necessary, or even worthwhile/helpful,
>> to avoid using the return value of `push'.
>>
>> And I think the return value should be documented.
>
> Well, I would perhaps agree, for CL compatibility' sake. But I think
> this is, up to a point, just bikeshedding. As shown, in 99,92% of cases
> the return value is not used, and in the 0,08% that it is used, it's
> just to avoid
>
>   (progn (push value variable) variable)
>
> or
>
>   (progn (push value variable) t)
>
> And it's a fact that, although push's return value *is* documented in
> CL, it has never been so in Emacs, at least going back to cl.el in
> Emacs 20 (even back then, there were just vague promises that it was
> similar to `setf').

There are hundreds of thousands, probably millions, of lines of Elisp in
third-party packages and user configurations in the world.  Removing the
return value of `push' would be a breaking change affecting innumerable
users.  It would break the existing, implicit API that has existed since
Emacs 20, released 22 years ago.

And for what?  The sake of not adding "and returns VALUE" to the
docstring and manual?

> So it'd be nice if it were documented, but it is not, and the few
> places that use it can easily be fixed. No big deal, not worth
> discussing it IMO.

By the same logic, it'd be nice if it were documented, and with a few
words added to a few files, it can easily be documented.  No big deal,
not worth discussing it IMO.

>> (This is like not documenting the return value of `progn' or `setq`'. ;-))
>
> The return value of `progn' is part of its interface and use. As
> for `setq', it wouldn't be earthshaking if it wasn't documented.

`push' is a standard Lisp feature and has been for decades.  An
oversight of a few words in the Elisp documentation is not reason to
break over 20 years of Elisp code.

What's going on?  What is the motivation here?




reply via email to

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