they are local tables ... so invisible to users
Fair point. I was concerned more with changeabiltity: this way someone who writes a new function has an obvious name (numberwords.french) for her new wordlist, and an obvious single point of alteration for her copy of verbose.english, namely to change `local words = numberwords.english` to `...numberwords.french`. (Algorithm tweaks will still come after that, of course.) The code needs very little changing. This is a minor point only, of course. --Sietse + local numberwords = { } - words = { + numberwords.english = { [1] = "one", ... } -spanishwords = { + numberwords.spanish = { [1] = "uno", ... } function verbose.english(n) + local words = allwords.english ... `words` already used throughout ... end function verbose.spanish(n) + local words = allwords.spanish -- to use a different table, no need to -- replace `spanishwords` throughout -- the function; just change the line above. ... no more `spanishwords`, just `words` ... end