Mike Gran <spk...@yahoo.com> writes:

>> `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?

That would be rather pointless.  You could just use the original string.

> Likewise, shouldn't (substring "abc" 1) return an immutable substring?

Why wouldn't you be using substring/shared if you are not going to
modify either string?

-- 
David Kastrup


Reply via email to