lua-users home
lua-l archive

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


Hi,

1. #... should be the same as select( '#', ... ) but should be able to avoid
copying the values around.

2. ...[ j ] should be the same as ( select( j, ... ) ) but again bypassing
the need to copy values around.

I would second that, but this will certainly bring back the discussion
about tupples.

One would expect to be able to do something like this:

    1. #(a, b, c)
    2. (a, b, c)[2]

Not sure if it is possible to work this syntax out without introducing
ambiguities.

While we are at it, anyone thought about having ... as an "l-value"?

    function capture(s, pat)
        local i, j, ... = string.find(s, pat)
        return ...
    end

Regards,
Diego.