[Top][All Lists]

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

Re: Guile BUG: What's wrong with this?

From: Bruce Korb
Subject: Re: Guile BUG: What's wrong with this?
Date: Sat, 07 Jan 2012 09:39:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

On 01/07/12 08:38, Mark H Weaver wrote:
* Modify the interface to `scm_i_string_start_writing' to give it the
   `start' and `end' indices.

* Add checks to all string mutation functions: if the range is empty,
   then avoid calling `scm_i_string_start_writing'.

Yes.  All of them.  All four.

The advantage to the first approach is that authors of future string
mutators won't have to remember to handle this case specially, and I
have very little confidence that they would.

I'll look into this.

Either way.  The advantage of quitting a string transformation function
early when the length to modify is zero is you save more overhead than
just calling scm_i_string_start_writing.  But it's your call.  Whatever.

reply via email to

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