lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 07/07/2012 10:06 AM, Alexandre Rion wrote:
s=0; k=0
grade="Ann 57, Bob 64,Cat 77, Don 62, Eve 51"
for n in grade:gmatch("%d+") do s=s+tonumber(n); k=k+1 end
print(s/k)

It's the same, it is easy, and it is clearer for people to understand your code. ->  + 10.000 points

You can already do this in your code if you wish, so what's the point of changing the language at this stage? Will it make Lua noticeable faster or smaller? Doubtful.