From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: The empty string and other empty strings Date: Tue, 10 Jan 2012 18:04:43 +0100 Organization: Organization?!? Message-ID: <87k44ztro4.fsf@fencepost.gnu.org> References: <4F027F35.5020001@gmail.com> <4F032C41.3070300@gmail.com> <87mxa4ifux.fsf@gnu.org> <4F038BF4.1070200@gnu.org> <87obujzmmc.fsf@Kagami.home> <4F048972.5040803@gnu.org> <87lipnm8yx.fsf@Kagami.home> <4F04D01D.5050801@gnu.org> <8762grf28k.fsf@netris.org> <4F05DC47.1000202@gnu.org> <878vlldb4k.fsf@netris.org> <1325811764.22562.YahooMailNeo@web37903.mail.mud.yahoo.com> <87wr95bo9y.fsf@netris.org> <1325857075.77324.YahooMailNeo@web37903.mail.mud.yahoo.com> <877h14bsx0.fsf@netris.org> <4F07747A.4080202@gnu.org> <87sjjsa0kh.fsf@netris.org> <87boqfa8cd.fsf@netris.org> <874nw353a4.fsf_-_@gnu.org> <8739bnagkr.fsf@netris.org> <87mx9vzfcz.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1326215122 16981 80.91.229.12 (10 Jan 2012 17:05:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2012 17:05:22 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 10 18:05:18 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rkf8P-00030o-Mr for guile-devel@m.gmane.org; Tue, 10 Jan 2012 18:05:17 +0100 Original-Received: from localhost ([::1]:40636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkf8P-0000JX-2P for guile-devel@m.gmane.org; Tue, 10 Jan 2012 12:05:17 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkf8L-0000JF-82 for guile-devel@gnu.org; Tue, 10 Jan 2012 12:05:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rkf8D-0005ge-Nv for guile-devel@gnu.org; Tue, 10 Jan 2012 12:05:13 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkf8D-0005g8-Dx for guile-devel@gnu.org; Tue, 10 Jan 2012 12:05:05 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rkf89-0002qM-Dq for guile-devel@gnu.org; Tue, 10 Jan 2012 18:05:01 +0100 Original-Received: from p508ed260.dip.t-dialin.net ([80.142.210.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2012 18:05:01 +0100 Original-Received: from dak by p508ed260.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2012 18:05:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508ed260.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:bub886sdn/dMmoGqakOpmUhxxoA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13471 Archived-At: ludo@gnu.org (Ludovic Courtès) writes: > Hello Mark, > > Mark H Weaver skribis: > >> ludo@gnu.org (Ludovic Courtès) writes: >>> Anyway, it seems that before, you couldn’t get any encoding error for >>> scm_from_stringn ("", "SOME-ENCODING"), whereas now you can. >> >> Good point. I just committed a change to avoid this. > > Cool, thanks for the instant reply and fix! > > And thanks to Mike and you for the remainder of the discussion and > optimizations. > > BTW, I just noticed that R5RS uses the phrase “empty strings” (plural) > in the description of ‘eq?’, which means we’re indeed on the right track. R5RS is supposed to be a standard, not a guessing game. When there is nothing more definitive than splitting hairs in the grammar of the text, I would prefer sane semantics over probably not even intended contortions. "Freshly allocated" for me means that _no_ string operation on pre-existing objects can make this string different from what it is. And since there is no way to share the empty contents of an empty string with other strings, this is true even if every empty string is eq? to every other one. -- David Kastrup