Lyqyd, on 29 April 2014 - 03:23 AM, said:
Also, Bomb Bloke's point above about table.remove touches on an important issue that should be addressed in this post--why is the table sparse in the first place? There are usually better ways of doing things than allowing a table to become sparse when you're going to want to have it be array-like later. I'm having trouble thinking of something that would result in having this sort of problem in the first place.
I'm creating a system that adds a z axis to the x,y of a monitor, where the user can use an arbitrary number for z and it creates a gapless ordered list based on that. this way a perosn can use (1,2,5,63,708) as the z numbers and when the code runs it the order will be (1,2,3,4,5), the values of those numbers will point to a differint place in the bigger table. I have plans that if z is not set the latest to be crated will have the highest z and thus placed ontop of everthing else.