[Top][All Lists]

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

Re: pure-fns in byte-opt.el

From: Stefan Monnier
Subject: Re: pure-fns in byte-opt.el
Date: Tue, 25 Jul 2017 10:16:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> I was curious about what other functions might be pure and could be
>> added to this list.  While I seem to have guessed correctly on some,
>> I am perplexed why adding string-to-char breaks things:
> Strings are not immutable.

I agree that string-to-char is not a pure function, according to my
understanding of the meaning of "pure" in such a context.  Yet, I can't
see why it leads to that error (AFAIK the purity is only used in order
to either get rid of the code when the result is not used (which is OK
for string-to-char), or to pre-evaluate the result when all args are
constants, which should be OK unless the function is called with an
immediate string that is later modified, which seems rather unlikely).


reply via email to

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