unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Cc: guile-user@gnu.org, guile-devel@gnu.org
Subject: Re: Worrying development
Date: Fri, 23 Jan 2004 23:37:09 +0100	[thread overview]
Message-ID: <4011A215.8060401@dirk-herrmanns-seiten.de> (raw)
In-Reply-To: <200401231716.JAA26107@morrowfield.regexps.com>

Tom Lord wrote:

>    > From: Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
>
>    > 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


  parent reply	other threads:[~2004-01-23 22:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16  9:41 Worrying development Roland Orre
2004-01-16 11:19 ` Thien-Thi Nguyen
2004-01-16 11:34   ` Roland Orre
2004-01-24 22:44     ` Thien-Thi Nguyen
2004-01-16 11:59 ` tomas
2004-01-18 21:05 ` Marius Vollmer
2004-01-18 21:58   ` Tom Lord
2004-01-22 16:11   ` Dirk Herrmann
2004-01-22 18:26     ` Shared Substrings [was: Worrying development] Robert Uhl
2004-01-22 18:42     ` Worrying development Tom Lord
2004-01-23 11:45       ` Dirk Herrmann
2004-01-23 17:16         ` Tom Lord
2004-01-23 21:01           ` Marius Vollmer
2004-01-23 22:18             ` Tom Lord
2004-01-24  0:27               ` Marius Vollmer
2004-01-24  0:53                 ` Tom Lord
2004-01-23 22:28             ` Paul Jarc
2004-01-24 12:09               ` rm
2004-01-24 13:29                 ` Marius Vollmer
2004-01-26  2:42                   ` overriding car/cdr (was: Worrying development) Paul Jarc
2004-02-08 16:21                     ` overriding car/cdr Dirk Herrmann
2004-02-08 18:09                     ` Marius Vollmer
2004-02-08 20:56                       ` Paul Jarc
2004-03-20 22:28                         ` Marius Vollmer
2004-03-22 17:05                           ` David Van Horn
2004-03-22 21:03                             ` Marius Vollmer
2004-03-22 17:24                           ` Paul Jarc
2004-01-23 22:37           ` Dirk Herrmann [this message]
2004-01-23 23:25             ` Worrying development Tom Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4011A215.8060401@dirk-herrmanns-seiten.de \
    --to=dirk@dirk-herrmanns-seiten.de \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).