From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile BUG: What's wrong with this? Date: Sat, 07 Jan 2012 23:25:07 +0100 Message-ID: <87r4zb177g.fsf@gnu.org> References: <4F027F35.5020001@gmail.com> <1325603029.22166.YahooMailNeo@web37906.mail.mud.yahoo.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> 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 1325975145 11981 80.91.229.12 (7 Jan 2012 22:25:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2012 22:25:45 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 07 23:25:41 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 1Rjeho-0007ii-VJ for guile-devel@m.gmane.org; Sat, 07 Jan 2012 23:25:41 +0100 Original-Received: from localhost ([::1]:39511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjehl-0005WK-5e for guile-devel@m.gmane.org; Sat, 07 Jan 2012 17:25:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjehW-0004sY-7U for guile-devel@gnu.org; Sat, 07 Jan 2012 17:25:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjehU-0001GH-Sl for guile-devel@gnu.org; Sat, 07 Jan 2012 17:25:22 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:45456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjehU-0001G2-Dz for guile-devel@gnu.org; Sat, 07 Jan 2012 17:25:20 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RjehS-0007Wj-Fl for guile-devel@gnu.org; Sat, 07 Jan 2012 23:25:18 +0100 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jan 2012 23:25:18 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jan 2012 23:25:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?iso-8859-1?Q?Niv=F4se?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:V8bqZObE847RWpcaD0Nj8GOtlIA= 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:13421 Archived-At: Hi, Mark H Weaver skribis: > I wrote: >> 3. Make scm_nullstr into a mutable string. After all, it can't be >> changed anyway, and the _only_ reference to it is from >> scm_from_stringn, so the result should always be mutable. > > For the record: my statement above was in error; scm_nullstr is actually > used in several files. However, I looked at each use, and in all cases > a mutable string is appropriate. Also, it is SCM_INTERNAL. So I > committed the change. Good! > However, I wonder if we should also remove this optimization from > scm_from_stringn, as Bruce suggested. The R5RS says that `string' and > `make-string' should return "a newly allocated string", which implies > that the new string should not be `eq?' to any existing object. > > Although our docs for scm_from_stringn et al do not explicitly specify > that the string is newly allocated, an argument could be made that we > should follow the behavior of `string'. > > What do other people think? Makes sense to return a new empty string, yes. Ludo’, who is hoping for the day where strings are immutable, period. :-)