[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Question about set-car! and set-cdr!
From: |
Jörg F. Wittenberger |
Subject: |
Re: [Chicken-users] Question about set-car! and set-cdr! |
Date: |
Thu, 06 Mar 2014 14:37:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux armv7l; rv:17.0) Gecko/20131104 Icedove/17.0.10 |
Am 06.03.2014 09:05, schrieb Daniel Carrera:
Hello,
I have recently learned about set-car! and set-cdr! which eventually
led me to learn about how Racket removed them years ago for the
reasons given in this post:
http://blog.racket-lang.org/2007/11/getting-rid-of-set-car-and-set-cdr.html
On the other hand, Chicken certainly has set-car! and set-cdr! and I
also see these functions in R7RS. I was wondering if there is a
balancing opinion (maybe a post somewhere) on this matter.
Frankly I find the above posting pretty balanced. Most people agree
that pure functional code is easier to judge and get right than code
having mutation.
Presumably these functions exist because someone thought they were a
good idea.
Still there is the history. Hence Scheme has mutation.
Maybe this could be addressed by splitting the "scheme" module of
chicken into a "scheme-pure" for the sake of safety, "scheme-mutations"
having the rest and make "scheme" importing and reexporting both sets of
bindings.