From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dirk Herrmann Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: Worrying development Date: Fri, 23 Jan 2004 23:37:09 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <4011A215.8060401@dirk-herrmanns-seiten.de> References: <1074246064.6729.23.camel@localhost> <87vfn9ufvw.fsf@zagadka.ping.de> <400FF648.3080706@dirk-herrmanns-seiten.de> <200401221842.KAA20956@morrowfield.regexps.com> <40110961.1040808@dirk-herrmanns-seiten.de> <200401231716.JAA26107@morrowfield.regexps.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074900335 13122 80.91.224.253 (23 Jan 2004 23:25:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2004 23:25:35 +0000 (UTC) Cc: guile-user@gnu.org, guile-devel@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jan 24 00:25:26 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkAg2-00045e-00 for ; Sat, 24 Jan 2004 00:25:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkAIs-0000Ir-Tz for guile-user@m.gmane.org; Fri, 23 Jan 2004 18:01:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AkAHs-0000F2-El for guile-user@gnu.org; Fri, 23 Jan 2004 18:00:28 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AkAHK-0008I3-8Y for guile-user@gnu.org; Fri, 23 Jan 2004 18:00:25 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AkAHJ-0008HU-W3; Fri, 23 Jan 2004 17:59:54 -0500 Original-Received: from [212.227.126.187] (helo=moutng.kundenserver.de) by mx20.gnu.org with esmtp (Exim 4.24) id 1Ak9vR-0000VZ-Hd; Fri, 23 Jan 2004 17:37:17 -0500 Original-Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1Ak9vL-0001DI-00; Fri, 23 Jan 2004 23:37:11 +0100 Original-Received: from [80.131.44.135] (helo=dirk-herrmanns-seiten.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1Ak9vL-0006jC-00; Fri, 23 Jan 2004 23:37:11 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821 X-Accept-Language: de, en Original-To: Tom Lord , mvo@zagadka.de In-Reply-To: <200401231716.JAA26107@morrowfield.regexps.com> X-Enigmail-Version: 0.76.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:494e3e4d1bf8dc247959c49e6f1f4215 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2704 gmane.lisp.guile.devel:3299 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3299 Tom Lord wrote: > > From: Dirk Herrmann > > > First: It's not a matter of whether users *need* to make certain > > assumptions: It's a matter of interface definition. Scheme defines the > > string data type and together with it, it defines the semantics of > > operations on it. > >Please show me what existing lines of the Scheme standard will have to >change if mutation-sharing shared substrings are added. > >The standard (not very formally but clearly enough) says that the >standard procedures which construct strings allocate fresh locations >for the contents of those strings. > >That means that none of those procedures create mutation-sharing >shared substrings -- nobody has proposed anything different. > >I think you are imagining that there is an additional requirement in >the standard: that any procedure at all which creates a new string >must allocate fresh locations for its contents. But that additional >requirement isn't there. Scheme programmers can not assume that that >requirement is part of Scheme. > As you say, the standard only describes functions that, on creation of strings, requires to allocate fresh locations for the contents of the strings. That is, someone who only uses the functions that are described by the standard is not able to create any mutation-sharing substring. And this, implicitly, indicates that different (in the sense of eq?) strings use different locations for their contents. To me this seems like a valid assumption. Standard-conforming scheme programs may IMO rely on this fact. However, I may be wrong in my interpretation of the standard, which is why I suggest the srfi approach (see below). >Mutation-sharing shared substrings are an upwards compatible extension >to the Scheme standard. They break no correct programs. They enable >new kinds of programs. > Introducing a separate data type for mutation-sharing character arrays also enables new kinds of programs. The difference between a separate data type and the former implementation is, that mutation-sharing substrings could be used everywhere where an ordinary string had been used before. That is, the difference is a matter of being able to re-use existing string-handling code rather than enabling new kinds of programs. However, it is exactly this re-using of existing string-handling code issue which becomes problematic when the semantics of the string objects change. Marius, would it be an acceptable compromise to require that the mutation-sharing substring issue be submitted and discussed as an srfi before it becomes an official part of guile's core? The discussion of the topic in that forum would reduce the risk that the change introduces problems. I would then ask those who are interested to have it as a part of guile to submit a srfi proposal. (Please note that, as I have said before, I have nothing against providing mutation-sharing substrings as a deprecated feature for some period - but not as an official part of guile's core.) Best regards Dirk _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user