[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13823: 24.3.50; Elisp manual description of property `pure'
From: |
Drew Adams |
Subject: |
bug#13823: 24.3.50; Elisp manual description of property `pure' |
Date: |
Tue, 26 Feb 2013 13:56:16 -0800 |
> 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?