lua-users home
lua-l archive

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




On Thursday, April 10, 2014, duz <duz@sol-3.de> wrote:


  local a, b, c = t[1]...


No, it's meant to turn "return (h(table,index))" into "return h(table,index)"


I'm sorry, but I still don't see why it is so important to
throw away any values here. Why is __index it in 2.4 defined to

   return (h(table,index))

instead of just

   return h(table,index)

which I'd find good uses for.



Because a function has multiple return values and a single index of a table only has one value and that is a defined specification of the language. 

-Andrew