[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: How do I get two dimensional array access notation for my (matrix) userdata?**
**From**: "E. Wing" <ewmailing@...>
**Date**: Mon, 28 Jul 2008 21:26:55 -0700

On 7/28/08, Olivier Galibert <galibert@pobox.com> wrote:
> On Sun, Jul 27, 2008 at 02:32:54PM +0200, Jerome Vuarand wrote:
>> By the way, now that I think about it, it could be nice to have a
>> syntactic sugar that would transform [x, y] into [{x, y}].
>
> It would be highly surprising, because {1,2} and {1,2} are
> different[1], so indexing with them would give a different cell each
> time.
>
> OG.
>
> [1] Different tables, even if they have the same contents, hence
> different from an indexing point of view.
Sorry, now I'm really confused:
{1,2} and {1,2} look visually identical to me.
And what is [1,2]? Does that have any meaning in Lua? (When I tried
it, I thought I got a syntax error.)
Thanks,
Eric