On 03-08-2022 12:55, Damien Mattei wrote:
but no restrictions with lists in Guile: scheme@(guile-user)> (define lst '(1 2 3)) scheme@(guile-user)> (set-car! lst 7) scheme@(guile-user)> lst (7 2 3)
Non-empty lists are pairs and the second part of the pair is another list -- in Guile, this is effectively implement as having the second part (the cdr) be a kind of pointer.
Pointers need relocation, so lists cannot be put in read-only sections (unless something like RELRO is used), and in Guile pairs do not have 'am I read-only' metadata (unlike strings).
(My unverified hypothesis on why you aren't seeing an error here.) Greetings, Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature