[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: persistence, table constructors and reserved words
- From: Richter, Jörg <Joerg.Richter@...>
- Date: Tue, 6 Feb 2007 14:46:52 +0100
I'm saving some configuration data as a LUA script to a file, just like the serialization example in PiL.
When writing string table keys I want to use the syntax { name="value" } and not { ["name"] = "value" }, to make it more readable and easier to edit by hand. Yes, you have to check <name> for valid identifiers and reserved words.
But now the problem. What if I want to read this configuration file with the next LUA version? I can only check the now known reserved words. I can add some words that are likely reserved words in the next version, like "continue" or so. Are there any other possibilities except to not use the shorthand syntax?
When not, what are likely reserved words in the next version?
I think the best solution would be to allow reserved words in table constructors.
Jörg