Thanks, Ed! Two remarks:

1. You mention iteration over resultset and introduce an example of iteration over array of columns cortege or record.

2. My question is not about getting values from arrays like list, locals, ppg, globals but what is better to use when you have a case of full scan over the array that in some cases lists are handier vs locals etc. 

Though the question of what array is better when you need to get values for keys is interesting too, maybe it's another good topic for discussion. Answering your statement here I agree for LB the choice for value by position if it's not a very large (huge) array, where the global is the only answer.

I was looking at @David Underhill's code for Metrics project and decided that for one level global traversing his code style is the most readable:

    s database="" for {
        s database=$o(databases(database))
        q:database=""

...

}

And in general:

s iter="" for {

    s iter=$o(^array(iter)) q:iter=""

 // do something

}

So, use for instead of while for global traversing and this is readable and you never miss the next set is in while example.

Mine is faster ;)

ClassMethod RussianToEnglish(russian = "привет") As %String

{

set rus="абвгдезийклмнопрстуфхыэАБВГДЕЗИЙКЛМНОПРСТУФХЫЭьЬъЪ"

set eng="abvgdeziyklmnoprstufhyeABVGDEZIYKLMNOPRSTUFHYE"

set rus("ж")="zh"

set rus("ц")="ts"

set rus("ч")="ch"

set rus("ш")="sh"

set rus("щ")="shch"

set rus("ю")="yu"

set rus("я")="ya"

set rus("Ж")="Zh"

set rus("Ц")="Ts"

set rus("Ч")="Ch"

set rus("Ш")="Sh"

set rus("Щ")="Shch"

set rus("Ю")="Yu"

set rus("Я")="Ya"

set english=$tr(russian,rus,eng)



set wow=$O(rus(""))

while wow'="" {

set english=$Replace(english,wow,rus(wow))

set wow=$O(rus(wow))

}

return english

}

USER>w ##class(Example.ObjectScript).RussianToEnglish("Я вас любил: любовь еще, быть может, В душе моей угасла не совсем;"))
Ya vas lyubil: lyubov eshche, byt mozhet, V dushe moey ugasla ne sovsem;
USER>

1 - Is there any plans to automatize the module.xml generation by using something like a Wizard?

Submit an issue?  More over, craft a module which supports that! And PR - it's a Community Package manager.

3 - Is it possible to run pre/post-install scripts as well? Kind of what installer classes do.

I think, this already in place. @Dmitry Maslennikov who contributed a lot will comment.

4 - Is also possible to use the module.xmlto provide a contextual root?

We maybe can use the code! Thanks! @Dmitry Maslennikov ?