This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: String representation proposal
- To: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
- Subject: Re: String representation proposal
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 27 Aug 2000 20:46:43 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <E13Spds-00008T-00@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> Implementation of shared substrings with fresh-copy semantics
I think this is very nice!
> * If small substrings are frequently generated from large, temporary
> strings and the small substrings are kept in a data structure, the
> heap will still have to host the large original strings. Should we
> simply accept this?
I think we can accept this, but should document this behaviour for the
user and provide for some means to work around it, like a function
`make-unshared' that will explicitely copy a string, even when it is
not changed. The user has than full control over which strings are
shared, if that is needed.