I just wanted to say that!
Mostly because today a had a coding battle versus an evil array, and i won!
But i can still feel the consequences of that battle Its like my head will explode one of these days.
That's why I use Lua. Lua has arrays, but not as evil Never turned back since.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
lua arrays are sucky. It won't let you access multidimensional arrays with variables unless they are loop indexes. My code that looked like this:
function updateChain(timeStep,id)
timeArray[timeStep][id] = {};
timeArray[timeStep][id]["X"] = mmf.Object.GetX(id);
timeArray[timeStep][id]["Y"] = mmf.Object.GetY(id);
end
doesn't work, by my code that does the exact same thing like this, does:
function updateChain(timeStep,id)
for i=timeStep,timeStep do
for j=id,id do
timeArray[i][j] = {};
timeArray[i][j]["X"] = mmf.Object.GetX(id);
timeArray[i][j]["Y"] = mmf.Object.GetY(id);
end
end
end
if you actually READ that, you'll see how evil lua arrays are
@cecil: Dude, graph papers are so evil. I never touched one since I got MATLAB, not even to copy paste results onto paper. Not a good comparison. MMF makes arrays more evil. There was a nasty bug in one of my games from arrays. I made an active, transferred data from the array to that active's alterable value, then transferred it to a counter and it worked.
@pixelthief: Heh, you need to add timeArray[i]={}
I don't see your point, though. That's about it. It's easier to read and fix than an array in MMF. If there's a bug, I can see it at a glance. I could stuff data into it and pull it out in no time.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.