On Dec 10, 7:33 am, Eivind Eklund <eekl... / gmail.com> wrote: > On Dec 10, 2007 12:10 PM, MonkeeSage <MonkeeS... / gmail.com> wrote: > > > 2.) While that may alleviate the typo problem, it introduces another > > class of bugs which are just as subtle: > > > var list = create_useful_list > > if should_modify_list(list) > > # I meant to modify the variable "list" here... > > var list = modify_list(list) > > end > > use_list(list) > > > Once one became accustomed to typing "var", there is every chance that > > it would be used places where a pre-existing variable was meant, but > > the "var" just got typed out of habit. > > This happens to me in perl, possibly about as often as the typo > problem in Ruby, possibly more. I'll note that I have a habit > intended to avoid typo problems: I fairly consistently use Vim's > "Ctrl-N" (complete based on string search in other parts of code), > even for short strings, just to avoid typos. > > Eivind. Thank you. That's a good suggestion. -J