
Actually text has limited relation to that thing on right side
Today I wrote a serializer function for Lua. A brief research has shown that not too many people know what this should do in first place. So, to theory:
For example, you have this table definition:
local o = {
1, 2, 3,
one = 1,
['Lua is'] = 'cool',
[true] = true,
{ 'this', 'is', 'a', 'table' }
}
At the time of 'compilation' (translation to VM bytecode) it is translated into non-textual representation that you can't tell a lot about, and probably should not worry about.
However, what if you want to get your modified table back, as text?
That's where a bit of puzzle appears, since there isn't a standard routine to do that.
And also where scope of using this function starts.
Continue reading →