[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lualint (Re: Static typing in Lua)
- From: Vyacheslav Egorov <mraleph@...>
- Date: Mon, 31 Jul 2006 09:55:12 +0700
Asko Kauppi wrote:
local string function dummy( table t, int i, optional int j,
optional number n )
...
local int x= i + (j or 0) + (n or 0)
return string t[x]
end
This syntax is ambiguous. It already have meaning
local string -- new local variable
function dummy (...) -- new global function
...
end
I think Pascal-style is more suitable for Lua than C-style:
local function dummy(t:table, i:int, j:int?, n:int?):string
...
end
--
e.v.e