[Top][All Lists]

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

Re: master f51f963: Fix some side-effecting uses of make-text-button

From: Pip Cet
Subject: Re: master f51f963: Fix some side-effecting uses of make-text-button
Date: Fri, 05 Jun 2020 14:31:43 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Pip Cet <pipcet@gmail.com> writes:
> [...]
>> It would not be a quick bug fix for code that uses (propertize "string"
>> 'a 'b).
> propertize returns a copy of its argument, so it's not problematic in
> this context.

Thanks for pointing that out. I hope it was still clear what I meant.

>> In particular, I'm not convinced code like that is buggy at all. It's
>> true that it will fail under certain conditions (the string constant is
>> used again in the same function, the function is byte compiled, that
>> sort of thing), and it's true there are better ways of doing that, but
>> is that reason enough to off-handedly ban all such code?
> [...]
> My only concern with destructively modifying string literals as in the
> (make-text-button "here" ...) example is that it can "pollute" that
> string literal for all of its users, which is both "rude" and
> unnecessary in this case.  I simply find it cleaner, less intrusive, and
> less surprising to modify only one's own copy of a string in such a
> trivial case.  I'm not personally concerned with crashes, theoretical
> purity or mutability, or anything like that; for that I defer to you,
> Paul, and other experts.

I'd like to apologise. I made several mistakes in that email (including
using the word "off-handedly" when a less offensive term would have
done). Most importantly, I think, I was commenting on a change that, as
you correctly point out, made the code cleaner and less surprising, as
though it were a whole-hearted endorsement of breaking any existing code
that is more surprising or less clean. I see now that you said no such

reply via email to

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