lua-users home
lua-l archive

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

I fully agree. LuaSub has '-snokw' (no keywords - in table indices) for exactly this.

This is especially vital for the enhanced 'assert' and 'type' libs that allow:

	assert.function( val )
	assert.true( val )
	type.function( val )


Hans Hagen kirjoitti 20.2.2008 kello 16:26:


	t = {}
	t.repeat = "x"

this gives

	'<name>' expected near 'repeat'

i can imagine some limitations like assigments, say

	repeat = 'x'

but since the reference states that as syntactic sugar for a["name"]

i'd expect the parser to recognize such cases; isn't this tricky with repect to future extensions (read: new keywords) being used in scripts as keys already?


                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 |