[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposal to make null string handling more emacs-y
From: |
Ted Zlatanov |
Subject: |
Re: proposal to make null string handling more emacs-y |
Date: |
Wed, 25 Apr 2012 09:21:53 -0400 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) |
On Wed, 25 Apr 2012 15:28:59 +0900 Miles Bader <address@hidden> wrote:
MB> Steve Yegge <address@hidden> writes:
>> * it's Lispy. Yes, most Lisp dialects got strings wrong, but that
>> shouldn't stop us. Strings are just character sequences, and whether
>> you like it or not, the nil/empty-list equivalence is part of Emacs's
>> soul. Throwing an error on a nil string is a radical departure from
>> the core philosophy.
MB> That's a pretty dubious claim...
I see strings as a vector sequence, not a list sequence. Thus:
(null (make-vector 0 "hello"))
=> nil
(null (make-list 0 "hello"))
=> t
So it makes sense to me that an empty string would be more like a
0-length vector. This is a painful area in Perl[1], which treats undef
*and* several strings as equivalent in a boolean context. I think it
would be painful in Emacs Lisp too.
Ted
[1] http://www.perlmonks.org/?node_id=862 and many others
- proposal to make null string handling more emacs-y, Steve Yegge, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Karl Fogel, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Miles Bader, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Helmut Eller, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Eli Zaretskii, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Stefan Monnier, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Eli Zaretskii, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Stefan Monnier, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Miles Bader, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Andreas Schwab, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Juanma Barranquero, 2012/04/25
- Re: proposal to make null string handling more emacs-y, Steve Yegge, 2012/04/26
- Re: proposal to make null string handling more emacs-y, Miles Bader, 2012/04/26