lua-users home
lua-l archive

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

On Jun 13, 2014 12:45 PM, "Paige DePol" <> wrote:

> My switch patch paired with my new patch would allow for the following syntax:
> const MOUSE_DOWN  1
> const MOUSE_MOVE  2
> const MOUSE_UP    3
> [...]
> With my patch the symbolic constants are replaced with the literal values during compile, so MOUSE_DOWN, MOUSE_MOVE, and MOUSE_UP are replaced with 1, 2, and 3 in this example before compilation into bytecode.

Lua does not have compile-time dependencies; there's no #include or import. This kind of declaration implies an additional mechanism if consts are to be used as a module interface.