Re: inadequate documentation for select and table.unpack
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: inadequate documentation for select and table.unpack
- From: Martin <eden_martin_fuhrspam@...>
- Date: 2016年6月21日 10:12:18 -0700
On 16-06-20 11:24 PM, Dirk Laurie wrote:
> One way is to make available the syntax `#...` and `...[k]` which would
> not be syntactic sugar for `select` but would generate a VM instruction
> VARARGK A B that puts into R(A) the k-th vararg (where k is computed
> from R(B) with the usual rule for negative values) or the vararg length
> of k=0. Of course, `...[k]=a` would still be illegal.
I did not fully understand how exactly string with new syntax may look like.
And lists is not only "...". Any function may return list of results. So
`select('#', f())` now returns number of function results. But `#f()`
returns "length" of first function result.