unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Pierpaolo Bernardi <olopierpa@gmail.com>
To: Damien Mattei <damien.mattei@gmail.com>,
	Maxime Devos <maximedevos@telenet.be>
Cc: guile-user <guile-user@gnu.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: string is read-only
Date: Wed, 03 Aug 2022 13:55:56 +0200	[thread overview]
Message-ID: <4gv5brc1t0p48tagh95scvbd.1659527756603@email.android.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]


Il giorno 3 agosto 2022, alle ore 13:36, Damien Mattei <damien.mattei@gmail.com> ha scritto:

>On Wed, Aug 3, 2022 at 12:59 PM Maxime Devos <maximedevos@telenet.be> wrote:
>>
>> (My unverified hypothesis on why you aren't seeing an error here.)
>>
>>
>>  it would be a big change and very strange :-O if the few lines of code
>below in scheme returned an error on lists:
>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)

This is illegal scheme. The  consequences of executing it are undefined.

It's unfortunate that because of implementation limitations many schemes do not detect this error.

>it is interesting ,at the end of page it says too that modifying quoted
>litteral should create an error :-O

It's how all Lisps, including guile, works.  So, yes, if one is interested in these languages, this is interesting knowledge :)


[-- Attachment #2: Type: text/html, Size: 1466 bytes --]

             reply	other threads:[~2022-08-03 11:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 11:55 Pierpaolo Bernardi [this message]
2022-08-03 12:48 ` string is read-only Damien Mattei
  -- strict thread matches above, loose matches on Subject: below --
2022-08-03  9:12 Damien Mattei
2022-08-03  9:32 ` Thomas Morley
2022-08-03  9:41 ` Maxime Devos
2022-08-03  9:57   ` Ricardo G. Herdt
2022-08-03 10:55   ` Damien Mattei
2022-08-03 10:59     ` Maxime Devos
2022-08-03 11:34       ` Damien Mattei
2022-08-03  9:42 ` Taylan Kammer
2022-08-03  9:50   ` Jean Abou Samra
2022-08-03 10:30     ` Taylan Kammer
2022-08-03 10:33       ` Jean Abou Samra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4gv5brc1t0p48tagh95scvbd.1659527756603@email.android.com \
    --to=olopierpa@gmail.com \
    --cc=damien.mattei@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).