lua-users home
lua-l archive

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


Hello Dolphin,

Wednesday, June 24, 2009, 10:39:11 PM, you wrote:

> I agree that it is a little strange but #Y simply returns a value such that
> Y[#Y+1]==nil is true, but it is not guaranteed to be the lowest positive number
> that satisfies that requirement.

moreover, in my code it returns the same value as maxn

i'm among those who thinks that these two concepts sliced together
(1. tables as arrays+hashes, and 2. nil as default value of any table
element) makes language somewhat too complicated

another idea that simplifies some things at the beginning but then
becomes nightmare is multiple return values. i don't like situation
when result depends on extra parenthesis added to expression

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin@gmail.com