emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

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