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