lua-users home
lua-l archive

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


It was thus said that the Great Tim Hill once stated:
> 
> That is, unless you *define* a sparse array as a table having an “n” key
> (and hope no-one uses this perfectly normal key for something else…).

  I wonder why Roberto didn't use _N for this?  Section 3.1:

	As a convention, programs should avoid creating names that start
	with an underscore followed by one or more uppercase letters (such
	as _VERSION).

and section 4.5:

	As with variable names, string keys starting with an underscore
	followed by uppercase letters are reserved for Lua.

  Makes it clear it's a Lua-specific variable and it shouldn't clash with
any user code.

  -spc