GNU bug report logs -
#13823
24.3.50; Elisp manual description of property `pure'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 26 Feb 2013 19:46:02 UTC
Severity: wishlist
Found in version 24.3.50
Done: Christopher Schmidt <christopher <at> ch.ristopher.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 13823 <at> debbugs.gnu.org (full text, mbox):
> If you can come up with a good description of what
> it does, I'm all ears.
You presumably know the content to be communicated - just what effect property
`put' has, when to use it, any gotchas or other things to be aware of etc.
I do not really know. I'm asking for precisely that info.
If you tell me the content - what `put' does, I will be more than glad to offer
help with the wording.
From the bug #13052 thread, it seems that this might be the effect and condition
of use, but please correct if wrong:
Non-nil means that when the symbol's function is
called with only constant arguments the byte-compiler
evaluates the call and replaces it in the compiled
code by its value.[*]
This is similar to replacing a macro call by the
evaluation of its expansion.
Use `put' only when the function has no side effects
and every evaluation of that function call returns
the same value regardless of the evaluation context.
[*] Does the byte-compiler always do this when the condition is satisfied? Or
does non-nil `pure' mean only that it might do this?
Is the above description correct? Should something else be said?
Perhaps the condition is too strong? Is there a use case for a function that
might not give the same result in all contexts, but for which the only
relevant/intended context is byte-compilation?
This bug report was last modified 12 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.