emacs-devel
[Top][All Lists]
Advanced

[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 14:38:23 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Tue, 30 Oct 2018 08:15:31 -0400
> 
> > I think the doc string should be (more) independent, at least in the
> > pcase-dolist case, because the semantics of executing BODY with
> > PATTERN matched against a LIST element is significantly different from
> > that of executing the dolist BODY with a VAR binding.
> 
> Hmm... I really don't see what difference you're thinking of.

I thought it was clear: matching doesn't assign any values to anything
directly related to BODY, so the mechanism by which it affects
execution of BODY needs to be described.

> Maybe a simpler way to document it is to show its definition:
> 
>     (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? ;-)



reply via email to

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