[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tables as vectors weirdness
- From: Diego Nehab <diego@...>
- Date: Sun, 4 Nov 2007 20:25:05 -0500 (EST)
Hi,
Think of it this way. Tables as arrays must be contiguous.
They start at index 1. If you have anything else, you don't
have a table as an array. You have a table, and that's it.
You are welcome to try overloading ipairs, #, __newindex and
__index to fake 0-based arrays. Maybe this solves your
problem. You can't overload the constructors, so you will
have to stick to the internal representation.
Regards,
Diego