What is this abot worrying about always spelling the variance name correctly?
Also I’d like to point out to you that you can do this:
[lua]Hi = “Hi”
length = Hi:len()[/lua]
I prefer this style, partly because it’s much shorter.
There are important reasons for using the Java ‘enhanced’ loops. Starting with the fact that it would properly balance the comparison, you are currently comparing a numeric for and a generic for.
Secondly the Java generic for (enhanced for) is faster and more uniform for accessing values in a collection. Suppose you tried your numeric for with a Linked List, using the index the whole time would increase the running time by a factor of the list’s size.