emacs-devel
[Top][All Lists]
Advanced

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

Re: `aset` on strings, changing the size in bytes


From: Richard Stallman
Subject: Re: `aset` on strings, changing the size in bytes
Date: Mon, 10 Sep 2018 01:48:19 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > >    (setq s (srep s from to newsubstring))

  > Why not have aset do this under the hood?

aset, with its current specification, cannot do this
because there is no way to replace the old string (as a Lisp object)
with a new string.

Currently a string object points to a separate string text.  That enables
aset to replace the old string text with a new string text.

If we wanted to change the string representation, that might become
impossible.  That might cause problems in places that uses aset.

I propose srep because some of those places might use srep instead.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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