lua-users home
lua-l archive

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

On Mon, Sep 20, 2010 at 8:29 PM, Nilson <> wrote:
> Proposition 1. Make the separator optional in table initialization
> Proposition 2. Extending the function name syntactic sugar to tables.

If they're doable, I like these two a lot.

> Proposition 3: Unquoted strings constants
> [snip]
> Well, the idea is: in table initializations, when the compiler uses
> the production field ::= exp and the exp is a single Name
> and Lua could not find a value, it will return the lexical element
> Name as a string.

Not something I'd really like, personally. Besides, you can do this
yourself with a metatable on _G (or whatever the current environment
table is) with an __index method that returns the key itself.