[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile: What's wrong with this?
From: |
Ludovic Courtès |
Subject: |
Re: Guile: What's wrong with this? |
Date: |
Wed, 04 Jan 2012 23:37:37 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Hi!
Mark H Weaver <address@hidden> skribis:
> For example, look at what Guile 1.8 does:
>
> guile> (let loop ((i 0))
> (define y "hello")
> (display y)
> (newline)
> (string-set! y i #\a)
> (loop (1+ i)))
> hello
> aello
> aallo
> aaalo
> aaaao
> aaaaa
> <then an error>
>
> So you see, even in Guile 1.8, (define y "hello") didn't do what you
> thought it did. It didn't fill y with the string "hello". You were
> actually changing the program text itself, and that was a serious
> mistake.
Indeed, funny example!
Ludo’.
- Re: Guile: What's wrong with this?, (continued)
- Re: Guile: What's wrong with this?, Mark H Weaver, 2012/01/04
- Re: Guile: What's wrong with this?, Andy Wingo, 2012/01/04
- Re: Guile: What's wrong with this?, Mark H Weaver, 2012/01/04
- Re: Guile: What's wrong with this?, Andy Wingo, 2012/01/04
- Re: Guile: What's wrong with this?, Bruce Korb, 2012/01/04
- Re: Guile: What's wrong with this?, David Kastrup, 2012/01/04
- Re: Guile: What's wrong with this?, Andy Wingo, 2012/01/04
- Re: Guile: What's wrong with this?, Bruce Korb, 2012/01/04
- Re: Guile: What's wrong with this?, Mark H Weaver, 2012/01/04
- Re: Guile: What's wrong with this?, Mark H Weaver, 2012/01/04
- Re: Guile: What's wrong with this?,
Ludovic Courtès <=