lua-users home
lua-l archive

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

>> Having the ability to add metadata to variables would be a nice
>> addition.  This would make it easier to do static analysis of lua
>> scripts.
>     Haskell syntax? :-)
>sin :: Real -> Real
>sin = function(a) return math.sin(a) end

I don't know Haskell but I was thinking about a simpler approach maybe a
static table that would follow the variable.  This would be totally
optional.  I just want a way to perform some "unit testing" on some of
my Lua scripts.  Most of my scripts follow certain patterns, and I would
like a way to test if the scripts don't follow that pattern.  Maybe
Haskell offers that.  I just don't know.