lua-users home
lua-l archive

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

On Mon, Sep 28, 2009 at 7:47 AM, <> wrote:
Date: Sun, 27 Sep 2009 13:45:26 -0400
From: Norman Ramsey <>
Subject: Re: Lua for large apps (was: Lua for GUI toolkit wrapping?)
To: Lua list <>
Message-ID: <">>

 > Static typing and compile-time checks (including warnings to the max) are
 > indispensable. The alternative for dynamically typed languages are
 > tests.

Actually another quite respectable alternative is program analysis.
I ran into Kostis Sagonas at the airport and it seems he has had some
very good results using something he calls 'success types' for Erlang
programs.  I would love to see similar technology applied to Lua.

A paper is at


Actually, it might be an interesting idea to provide an interface to set (some) and get (all)
information about a function object within the lua language itself.  One might use this to
expose annotations like type assertions, comment strings, and perhaps even more low-level
information like the function's name and source location and whether or not the function calls
yield directly.

Couple with access to the calling function object, and transitively to the entire call stack,
one might be able to do some interesting things at runtime.

- Mike