guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared strings


From: Dirk Herrmann
Subject: Re: Shared strings
Date: Mon, 10 Sep 2001 23:23:15 +0200 (MEST)

On 7 Sep 2001, Daniel Skarda wrote:

>   Now I would like to ask a question about shared substrings. I noticed than 
> in
> CVS HEAD they were removed by Dirk Herrmann and I would like to ask why. I 
> think
> that shared strings could be quite important feature for text crunching 
> scripts,
> so it seems I missed some important discussion about shared strings.
>  
>   Could somebody please explain me why were shared substrings removed?

Guile's shared substrings did not have the copy-on-write semantics.  
Thus, if you modified a string, this could influence its shared substrings
as well.  It was considered a concept that should better be implemented on
the user level.  And, I assume that if you think of shared substrings for
text crunching you don't especially think of the 'feature' to be able to
modify string s1 by modifying string s2, right?

Thus, together with the decision to get rid of the old shared substrings
it was planned to add 'implicitly shared substrings' to guile, i. e.
symbol->string and substring and such functions would automatically
generate substrings, but with a copy-on-write semantics such that writing
to either the string or its substrings would be 'safe', i. e. would not
influence the other strings.

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]