[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using empty_string as the only "" string
From: |
Juanma Barranquero |
Subject: |
Re: Using empty_string as the only "" string |
Date: |
Tue, 24 Apr 2007 23:54:00 +0200 |
On 4/24/07, Andreas Schwab <address@hidden> wrote:
In which way is this different from
(eq (cdr '(a)) (cdr '(b))) => t
Well, that's non-optional, according to the Emacs Lisp documentation:
"Also, since symbol names are normally unique, if the arguments are
symbols with the same name, they are `eq'."
The doc also says: "For other types (e.g., lists, vectors, strings),
two arguments with the same contents or elements are not necessarily
`eq' to each other: they are `eq' only if they are the same object,
meaning that a change in the contents of one will be reflected by the
same change in the contents of the other."
So, as I said, it is an issue of object identity. I didn't say that
the results above would be "wrong", only surprising, and a noticeable
change in the current behaviour.
Juanma
- Using empty_string as the only "" string, Dmitry Antipov, 2007/04/24
- Re: Using empty_string as the only "" string, Juanma Barranquero, 2007/04/24
- Re: Using empty_string as the only "" string, David Kastrup, 2007/04/24
- Re: Using empty_string as the only "" string, Lennart Borgman (gmail), 2007/04/24
- Re: Using empty_string as the only "" string, David Kastrup, 2007/04/24
- Re: Using empty_string as the only "" string, Andreas Schwab, 2007/04/24
- Re: Using empty_string as the only "" string, Kenichi Handa, 2007/04/24
- Re: Using empty_string as the only "" string, Andreas Schwab, 2007/04/25
- Re: Using empty_string as the only "" string, David Kastrup, 2007/04/25
- Re: Using empty_string as the only "" string, Andreas Schwab, 2007/04/25