[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __index returns truncated to one, why?
- From: Sean Conner <sean@...>
- Date: Thu, 10 Apr 2014 12:14:42 -0400
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
- References:
- __index returns truncated to one, why?, duz
- Re: __index returns truncated to one, why?, Dirk Laurie
- Re: __index returns truncated to one, why?, Andrew Starks
- Re: __index returns truncated to one, why?, steve donovan
- Re: __index returns truncated to one, why?, Dirk Zoller
- Re: __index returns truncated to one, why?, steve donovan
- Re: __index returns truncated to one, why?, Duncan Cross