[Top][All Lists]

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

Re: Using empty_string as the only "" string

From: Lennart Borgman (gmail)
Subject: Re: Using empty_string as the only "" string
Date: Wed, 25 Apr 2007 00:40:05 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070326 Thunderbird/ Mnenhy/

David Kastrup wrote:
"Lennart Borgman (gmail)" <address@hidden> writes:

David Kastrup wrote:

'(a) is (cons 'a nil), '(b) is (cons 'b nil),
so indeed the cdr of both lists is the identically same value.  Lists
are _identically_ grounded.
And strings?

Aren't grounded at all.  (concat "a" "b") does not make "b" part of
the result.  So (concat "a" "") and (concat "b" "") would not share
the same "" even if one replaced both of them by the same object.

Every created string is a separate object not containing any other
string as a part.  The same is not true for lists.  You can, for
example, modify a sublist and in the process change the list
containing it.

This does not happen for substrings.

I am not sure I understand that this means that "" and "" can't be seen as equal. Is there any theoritical wrong with thinking about a vector as a list with certain restrictions, properties and special access routines?

But I am not into this at all so I do not know.

reply via email to

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