> it's what I was trying to avoid

I dunno why ... the code is clearer, and sometimes you end up wanting the 
unstripped line, e.g., to print it.

> For example, I often use i and s as scratch variables for integers and 
> strings, repeatedly, in functions where the meaning of how they're used is 
> localised and easy to grasp.

There's a big difference between reusing names in different scopes and reusing 
them in the same scope. The latter begs for bugs.

> In this case, line has the meaning for me of "the current line of text I'm 
> working on, in whatever state of processing I want it to be in at this point 
> in the loop".

If line is undergoing multiple transformations, then a) that sounds like an 
inefficient design, b) again, the code would be clearer if the name was 
different, reflecting the semantics of the transformation, and c) you need var, 
not let.

Reply via email to