[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile: What's wrong with this?

From: Mike Gran
Subject: Re: Guile: What's wrong with this?
Date: Thu, 5 Jan 2012 17:02:44 -0800 (PST)

> `define' merely makes a new reference to an existing object.  If you
> want a copy, you must explicitly ask for one (though this could be
> hidden by custom syntax).  It would not be desirable for the language to
> make copies automatically as part of the core `define' syntax.  For one
> thing, sometimes you don't want a copy.  Sometimes you want shared
> mutable objects.

It is curious that action of 'copy' really means the
action of 'create a copy with different properties'.
Shouldn't (string-copy "a") create another immutable string?
Likewise, shouldn't (substring "abc" 1) return an immutable substring?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]