[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: "Jan de Vos" <Jan.de.Vos@...>
- Date: Tue, 29 Jul 2008 08:02:09 +0200
> 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.
Unless you have an __index metamethod that interprets the /contents/
of the key that was given (of course, creating syntax sugar in the
Language just for cases where you have such a metamethod would NOT be a
good idea :-)
Jan