[Top][All Lists]

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

Re: Replace trivial pcase occurrences in the Emacs sources

From: Eli Zaretskii
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Tue, 30 Oct 2018 19:00:02 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Tue, 30 Oct 2018 11:00:47 -0400
> >>     (dolist (x LIST) (pcase-let ((PATTERN x)) BODY))
> > You aren't saying that showing the code removes the need for any
> > documentation of what it does, do you? ;-)
> I think I am, yes.

Seriously?  This cannot fly: for starters, the user could be using an
Emacs where *.el files are not accessible.  More generally, it sounds
like a defeat to say that we are unable to describe the behavior, and
ask users to read the code instead.

> In cases like these where the definition is really just a trivial
> combination of two less trivial elements, it might be a better
> option for the docstring, since it is both more concise and more
> precise than whatever wording we can come up with to try and repeat
> what dolist and pcase-let do.

Tell you what: how about if you try explaining this, and I will then
make a better doc string out of that?  Deal?

reply via email to

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