emacs-devel
[Top][All Lists]
Advanced

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

Re: 31395511: "Don’t attempt to modify constant strings"


From: Pip Cet
Subject: Re: 31395511: "Don’t attempt to modify constant strings"
Date: Thu, 04 Jun 2020 21:42:40 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> To be honest, I'd prefer a mutablep predicate, with a strong warning not
>> to use it in the way that was suggested:
>>
>> (if (mutablep object)
>>     (do-something object)
>>   (do-something (copy object)))
>
> Aka  (do-something (if (mutablep object) object (copy object)))

All the more reason to avoid my bad-example code!



reply via email to

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