On 03-08-2022 11:51, Damien Mattei wrote:
ok
and i suppose it is the standard, i have been confused by other schemes or racket where my code worked:

It happens to work in Guile too, when you use the interpreter instead of the compiler:

scheme@(guile-user)> (eval `(let ((a ,(string-copy "foo"))) (string-set! a 0 #\b) a) (current-module))
$1 = "boo"
However, as implied by <https://lists.gnu.org/archive/html/guile-devel/2012-01/msg00135.html>, it's not something to rely upon.  (Maybe 'eval' should make all strings it encounters in the S-exp read-only first with substring/read-only, assuming that doesn't come with a performance cost.)

Greetings,
Maxime.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to