From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.devel Subject: Re: proposal to make null string handling more emacs-y Date: Sun, 29 Apr 2012 12:51:26 -0700 Message-ID: References: <4F9D7399.4050703@online.de> <4F9D7A6C.9070806@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d64834c0141904bed6a923 X-Trace: dough.gmane.org 1335729101 5540 80.91.229.3 (29 Apr 2012 19:51:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2012 19:51:41 +0000 (UTC) Cc: Steve Yegge , Drew Adams , Emacs developers To: =?ISO-8859-1?Q?Andreas_R=F6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 29 21:51:39 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SOa9f-0006Ju-FH for ged-emacs-devel@m.gmane.org; Sun, 29 Apr 2012 21:51:35 +0200 Original-Received: from localhost ([::1]:44237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOa9e-00027E-Pt for ged-emacs-devel@m.gmane.org; Sun, 29 Apr 2012 15:51:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOa9b-000276-RP for emacs-devel@gnu.org; Sun, 29 Apr 2012 15:51:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOa9a-0000Gr-3k for emacs-devel@gnu.org; Sun, 29 Apr 2012 15:51:31 -0400 Original-Received: from mail-wi0-f171.google.com ([209.85.212.171]:48554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOa9Z-0000Gc-Ra for emacs-devel@gnu.org; Sun, 29 Apr 2012 15:51:30 -0400 Original-Received: by wibhj13 with SMTP id hj13so1658269wib.12 for ; Sun, 29 Apr 2012 12:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CC4S/eethWma/TKnr2Fxwy8mQA8OLnq0QqzPBCU+i10=; b=mIG9lYsKtddOjA+uu6Mhf2javVODEE9kjWRuI9w/XhTGJtsMgTpe6KuQiCax7NuC8h xKsquWXdIav2sv+jRm78k27hPiy6BjglY36M2x3JFnYMfvsOSHzbSlJUXnPxCaWrpVAl rVnTSx+kShHoTYTJR5rQY7NHPkgUt1+KdJvU8wnPHn8vNxj0igHdAZjbzG45tfMD6g55 xVbLNsGa6FTXK6DTUXWxYhq4sNedYsCa+fN4CfxujZ8MOSjVGVjNY6MKdiTaVR7JvcYh 6XuigppURuXRKrV9Nt6Xgyjeo2GOAcvVZ1fb9lYcOxgkauIemkpQsUyWQSFHzyYjZWec bBFw== Original-Received: by 10.216.131.30 with SMTP id l30mr11160884wei.111.1335729087058; Sun, 29 Apr 2012 12:51:27 -0700 (PDT) Original-Received: by 10.223.116.200 with HTTP; Sun, 29 Apr 2012 12:51:26 -0700 (PDT) In-Reply-To: <4F9D7A6C.9070806@online.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.171 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150143 Archived-At: --0016e6d64834c0141904bed6a923 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sunday, April 29, 2012, Andreas R=F6hler wro= te: > Am 29.04.2012 19:08, schrieb Drew Adams: >>>> >>>> (string=3D nil "") >>> >>> (if "" >>> (message "%s" "empty string proved true") >>> (message "%s" "empty string proved false")) >>> =3D=3D> "empty string proved true" >> >> "" is not equal or eq or eql to nil. >> But "" is string=3D to nil. >> >> > > in other words said: > > if the empty list is nil, why the empty string should yield true? > > for me > > (equal nil "")=3D=3D> t > > would be plausible Think of it as converting nil to a string when necessary. `string=3D' requires strings, so nil is treated as "". `equal' doesn't require strings, so nil is treated as nil. --=20 -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. --0016e6d64834c0141904bed6a923 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sunday, April 29, 2012, Andreas R=F6hler <andreas.roehler@online.de> wrote:
> Am 29.04= .2012 19:08, schrieb Drew Adams:
>>>>
>>>> (s= tring=3D nil "")
>>>
>>> (if ""
>>> =A0 =A0 =A0(m= essage "%s" "empty string proved true")
>>>= =A0 =A0 =A0 =A0(message "%s" "empty string proved false&quo= t;))
>>> =3D=3D> =A0"empty string proved true"
>>
>> "" is not equal or eq or eql to nil.
>= > But "" is string=3D to nil.
>>
>>
><= br>> in other words said:
>
> if the empty list is nil, why = the empty string should yield true?
>
> for me
>
> (equal nil "")=3D=3D> t>
> would be plausible

Think of it as converting nil to a = string when necessary. =A0`string=3D' requires strings, so nil is treat= ed as "". =A0`equal' doesn't require strings, so nil is t= reated as nil.

--
-PJ

Gehm's Corollary to Clark's Law: Any technolo= gy distinguishable from
magic is insufficiently advanced.
--0016e6d64834c0141904bed6a923--