emacs-devel
[Top][All Lists]
Advanced

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

Re: Predicate for true lists


From: Basil L. Contovounesios
Subject: Re: Predicate for true lists
Date: Wed, 17 Apr 2019 18:56:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Attachment: 0001-Improve-pure-and-side-effect-free-docs.patch
Description: Text Data

Attachment: 0002-Move-side-effect-free-from-unsafep.el-to-subr.el.patch
Description: Text Data

"Basil L. Contovounesios" <address@hidden> writes:

>> Isn't this in direct contradiction with (info "(elisp) Standard
>> Properties") which states that side-effect-free should not be set?:
>>
>> ‘side-effect-free’
>>      A non-‘nil’ value indicates that the named function is free of
>>      side-effects, for determining function safety (*note Function
>>      Safety::) as well as for byte compiler optimizations.  Do not set
>>      it.
> 
> No, because the audience of (info "(elisp) Standard Properties") is the
> average Elisp author, whereas the audience of (info "(elisp) Writing
> Emacs Primitives") is the average contributor to Emacs core.
> 
> Currently, the side-effect-free property seems to be intended as an
> internal one, since it makes some pretty strong guarantees, and is
> described only in the commentary and code of byte-opt.el.  This is my
> interpretation of the "Do not set it" wording.

Upon further reading of byte-opt.el and byte-run.el and inspection of
the history of this documentation, I see nothing internal about the
side-effect-free property.  In other words, this seems to be a
near-identical case of bug#13823.

> Unless someone beats me to it, I intend to try to clarify this in the
> next version of my patch.

I attach two patches.  The first updates the Elisp manual as discussed,
and the second moves all side-effect-free property setting from
unsafep.el to subr.el, as declarations of the relevant functions.  WDYT?

Thanks,

-- 
Basil

reply via email to

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