bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?


From: Stefan Monnier
Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?
Date: Sat, 25 Jul 2020 18:30:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> There are also some functions declared 'pure' that appear to have side
>>> effects: kbd, package-get-version
>> Which side-effects are you thinking of?
> They both clobber the match data.

It's not a problem w.r.t optimizing pure functions, tho: those functions
don't promise to modify the match data, so it's OK to replace calls to
them with their return value.

But yes, it's a problem because `C-h o kbd RET` says explicitly that it
doesn't change the match data :-(


        Stefan






reply via email to

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