lua-users home
lua-l archive

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


It was thus said that the Great Duncan Cross once stated:
> On Thu, Apr 10, 2014 at 12:33 PM, steve donovan
> <steve.j.donovan@gmail.com> wrote:
> > On Thu, Apr 10, 2014 at 1:03 PM, Dirk Zoller <duz@sol-3.de> wrote:
> >> Is there is a good technical reason for this truncation?
> >
> > It is in a very important part of the VM, and any extra work at this
> > point is going to slow the usual case down. (By how much, I don't
> > know.)
> 
> I just realised this could be another case for my old suggestion [1]
> about '...' as a suffix operator which means, explicitly, "do not
> truncate this list of values". My original suggestion was for function
> call arguments, so:
> 
>   func(a()..., b, c)
> 
> ...would not truncate the return values of a(), as it normally would.
> But another case could be for this case, so:
> 
>  local a, b, c = t[1]...

	t = { 'one' , 'two' , 'three' }
	local a, b, c = t[1]...

  a == 'one', that's fine.

  What does b and c equal?  

  -spc