lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Given wrote:
Try this instead, which is a common idiom:

d = {
	one = 1, [1] = "one",
	two = 2, [2] = "two",
	three = 3, [3] = "three"
}

Renaming field names will horribly mangle this.

My point is that field names are not just arbitrary symbols (like local
variable names). They're actually *data*, which your program may need to
process, and therefore changing them will break your program.

I can see your point. This may possibly be considered as a special case for the obfuscator to handle. The obfuscator can be made smart! :)

--
Shmuel