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: Michael Heerdegen
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Wed, 31 Oct 2018 00:08:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> LGTM, thanks.  We could maybe give a hint about why, e.g. saying that
> there are no guarantees about the order and number of times they are run.

Are these the only restrictions?  Are there even cases where side
effects can still be relied on - e.g. in

#+begin_src emacs-lisp
(pcase EXPR
  ((and P1 (guard (prog1 t (setq x 15))) P2) BODY1)
  ...)
#+end_src

is it legitimate to assume that x has been set to 15 if BODY1 is
evaluated (and P1 and P2 don't touch x)?

Or should we say side effects are generally disallowed - maybe also
because we don't know how this could change in the future?


Thanks,

Michael.



reply via email to

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