From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile BUG: What's wrong with this? Date: Sat, 7 Jan 2012 07:20:30 -0800 (PST) Message-ID: <1325949630.39713.YahooMailNeo@web37908.mail.mud.yahoo.com> 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> Reply-To: Mike Gran NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1325949643 19597 80.91.229.12 (7 Jan 2012 15:20:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2012 15:20:43 +0000 (UTC) Cc: "guile-devel@gnu.org" To: Mark H Weaver , Bruce Korb Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 07 16:20:39 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 1RjY4T-0002Uy-4G for guile-devel@m.gmane.org; Sat, 07 Jan 2012 16:20:37 +0100 Original-Received: from localhost ([::1]:56552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjY4S-0000w2-Kl for guile-devel@m.gmane.org; Sat, 07 Jan 2012 10:20:36 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjY4Q-0000vx-83 for guile-devel@gnu.org; Sat, 07 Jan 2012 10:20:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjY4O-0003xj-BS for guile-devel@gnu.org; Sat, 07 Jan 2012 10:20:34 -0500 Original-Received: from nm14-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.144]:46698) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RjY4O-0003xX-3d for guile-devel@gnu.org; Sat, 07 Jan 2012 10:20:32 -0500 Original-Received: from [98.138.90.48] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jan 2012 15:20:30 -0000 Original-Received: from [98.138.89.198] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jan 2012 15:20:30 -0000 Original-Received: from [127.0.0.1] by omp1056.mail.ne1.yahoo.com with NNFMP; 07 Jan 2012 15:20:30 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 673573.64478.bm@omp1056.mail.ne1.yahoo.com Original-Received: (qmail 44404 invoked by uid 60001); 7 Jan 2012 15:20:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1325949630; bh=TjtL2L8Z+4LPIoho+eK4iXcGpbj/pp/kcxvs7SOLmy8=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=QFpHJse8IQKbbjI9KkH8pEIGH2h2yzas06P0hwTtgvX+a0vjCEsJVVhtuNfJEtIS0WvElOrllesLf8zePKNfPZobi9Sdi9MnENt2LACS0aEHcJD6X0bLNMfP3rcr9ZMLPTkoSOmKlyTeNifOQzgsNPtaGRHVOWf3RR48FrKi4YU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zOmjX7ou8B++zdKIjC8cPiKCAbCLNProUURuVLMm+aHvWrVEobr83khp/gil4i4rjMy2RXweLGUn+ItP6C36RVvlwkYW+s8aAFlktgIzr+Gt6Tc1cgYur1fuijQYxUEaxuuau0wtjSpvSETW3i1RpDjTulCetk5xR9ftWnwgxYU=; X-YMail-OSG: pJ0mhSoVM1m6QzpOdXlSJxkqVYFgCK44i_K_l.5T1ib9crJ J3w3Z_eESVrVmSfw8oc.Bnder3TtPFypv4H3WqDL.TBeOXlBtobuALY7oRF1 NMYlZIVfg6nogCkj4vdnbwbEJ7rXfNs.DYj9Lq5hdqWpRLSTxCvjsMpZnHMk y8L3Zt_zOn5XWj29NUja83OrCjXPhEvqbPDiWXdUIRbtzpStDypOge4AgrSN zOtjHrWnmSZlnK_21pniJzg9zYEJGBWeL1M6xXMtaEeHivgstxlwrQglgaSq cXIzyAXW7A4ffDzauKWGZQTSEB.svFQFW7womMFtgEm_aI3hfrAGMz4rQuAW HIK4TIYOu0L_3UZ58nJ.GinAN8TKQ_WOlx1g46vMOr3ZlV8vDt_4GOHwmImf 0H8HIdqfHaPGkp2WUuJ3Th.zxmnWM4kN3EhEX4C4SKxfIqlls86ncOEnA0oj bvuBwa_TNe0Bh.cID_11kDQ-- Original-Received: from [71.130.220.24] by web37908.mail.mud.yahoo.com via HTTP; Sat, 07 Jan 2012 07:20:30 PST X-Mailer: YahooMailWebService/0.8.115.331698 In-Reply-To: <87boqfa8cd.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 98.138.91.144 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:13399 Archived-At: > From: Mark H Weaver =0A> =0A> I wrote:=0A>> 3. Make scm_= nullstr into a mutable string.=A0 After all, it can't be=0A>> =A0 =A0 chang= ed anyway, and the _only_ reference to it is from=0A>> =A0 =A0 scm_from_str= ingn, so the result should always be mutable.=0A> =0A> For the record: my s= tatement above was in error; scm_nullstr is actually=0A> used in several fi= les.=A0 However, I looked at each use, and in all cases=0A> a mutable strin= g is appropriate.=A0 Also, it is SCM_INTERNAL.=A0 So I=0A> committed the ch= ange.=0A> =0A> However, I wonder if we should also remove this optimization= from=0A> scm_from_stringn, as Bruce suggested.=A0 The R5RS says that `stri= ng' and=0A> `make-string' should return "a newly allocated string", which = =0A> implies=0A> that the new string should not be `eq?' to any existing ob= ject.=0A=0AI threw in the optimization a couple of years ago into scm_from_= stringn=0Aonly because I saw it used elsewhere in the code.=A0 This was wel= l before=0AGuile-2.0's switch of the immutable flag.=A0 So there wasn't muc= h thought=0Abehind it.=0A=A0=0A-Mike=0A=A0=0A=A0=0A=A0=0A=A0=0A> =0A> Altho= ugh our docs for scm_from_stringn et al do not explicitly specify=0A> that = the string is newly allocated, an argument could be made that we=0A> should= follow the behavior of `string'.=0A> =0A> What do other people think?=0A> = =0A> =A0 =A0 =A0 Mark=0A> =A0