lua-users home
lua-l archive

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




2010/11/25 steve donovan <steve.j.donovan@gmail.com>
On Thu, Nov 25, 2010 at 9:20 AM, Miles Bader <miles@gnu.org> wrote:
> That wouldn't be necessary, the new syntax wouldn't break old code.

Yes, one could say {f()...} if you wanted to be explicit, but {f()}
would still behave the same way.

There is the possibility of confusion where ... is used in two very
different ways:

function varargs(f,...)
   return {f(...)...,...}
end

steve d.


now we changed the standard library in Lua 5.2(the set/getfenv are deprecated. so change the ... semantics is not a unacceptable change in new version of lua. if we makes f() return its all return value in all situation, and  (f()) just return its first return value, we will get the consistency behavior then we process return value. I think thus is important than portability.