lua-users home
lua-l archive

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


On Wednesday, October 02, 2013 10:51:44 AM Luiz Henrique de Figueiredo wrote:
> The # operator for tables remain a source of confusion for users.
> I wish it was different but there it is.

I'm of the opinion that the confusion partly comes from calling it the 
"length" operator. If it had some other name, such as "hash" or "key" or 
"george", people learning Lua wouldn't get in the habit of thinking it has 
anything other than a coincidental relationship to the length of a sequence.

Another habit we should not be practicing is thinking of Lua tables as having 
array and hash parts.

-- 
tom <telliamed@whoopdedo.org>