[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile BUG: What's wrong with this?
From: |
Ludovic Courtès |
Subject: |
Re: Guile BUG: What's wrong with this? |
Date: |
Sat, 07 Jan 2012 23:25:07 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Hi,
Mark H Weaver <address@hidden> skribis:
> I wrote:
>> 3. Make scm_nullstr into a mutable string. After all, it can't be
>> changed anyway, and the _only_ reference to it is from
>> scm_from_stringn, so the result should always be mutable.
>
> For the record: my statement above was in error; scm_nullstr is actually
> used in several files. However, I looked at each use, and in all cases
> a mutable string is appropriate. Also, it is SCM_INTERNAL. So I
> committed the change.
Good!
> However, I wonder if we should also remove this optimization from
> scm_from_stringn, as Bruce suggested. The R5RS says that `string' and
> `make-string' should return "a newly allocated string", which implies
> that the new string should not be `eq?' to any existing object.
>
> Although our docs for scm_from_stringn et al do not explicitly specify
> that the string is newly allocated, an argument could be made that we
> should follow the behavior of `string'.
>
> What do other people think?
Makes sense to return a new empty string, yes.
Ludo’, who is hoping for the day where strings are immutable, period. :-)
- Re: Guile BUG: What's wrong with this?, (continued)
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Bruce Korb, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/09
- Re: Guile BUG: What's wrong with this?, Bruce Korb, 2012/01/09
- Re: Guile BUG: What's wrong with this?, Andy Wingo, 2012/01/09
- Re: Guile BUG: What's wrong with this?, Bruce Korb, 2012/01/09
- Re: Guile BUG: What's wrong with this?, David Kastrup, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mike Gran, 2012/01/07
- Re: Guile BUG: What's wrong with this?,
Ludovic Courtès <=
- The empty string and other empty strings, Ludovic Courtès, 2012/01/10
- Re: The empty string and other empty strings, Mike Gran, 2012/01/10
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/10
- Re: The empty string and other empty strings, Mike Gran, 2012/01/10
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/10
- Re: The empty string and other empty strings, David Kastrup, 2012/01/10
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/10
- Re: The empty string and other empty strings, Ludovic Courtès, 2012/01/12
- Re: The empty string and other empty strings, David Kastrup, 2012/01/13
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/13