[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: sunday afternoon whishlist
- From: HyperHacker <hyperhacker@...>
- Date: Tue, 8 Jun 2010 20:33:58 -0600
On Tue, Jun 8, 2010 at 19:57, David Manura <email@example.com> wrote:
> On Mon, May 10, 2010 at 2:26 AM, Juris Kalnins <firstname.lastname@example.org> wrote:
>>> Could x be syntactic sugar for x[#x+1] ? ...
>> Actually, it would be more powerful to have  operator take arbitrary
>> number of values, just like () does.
> With these extensions, "t[f()] = 1" might have different meanings
> depending on whether f() returns 0, 1, or > 1 values.
> The existing ways to express matrix get/set syntax in Lua [1-2] are
> either less efficient or less clean than m[a,b]=c . Even with good
> syntax, questions of efficiency remain though .
>  http://lua-users.org/lists/lua-l/2009-11/msg00285.html
> "help to (slightly) modify Lua interpreter"
>  http://lua-users.org/lists/lua-l/2008-07/msg00604.html
> "How do I get two dimensional array access notation for my
> (matrix) userdata?"
>  http://lua-users.org/lists/lua-l/2009-08/msg00048.html
> "matrix operations and temporary objects?"
There is a patch on the wiki that allows t[1,2,3] as syntactical sugar
for t. I don't think it does anything special with t
Sent from my toaster.