lua-users home
lua-l archive

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

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.