CONSIDERATION: "%s: %s":format() is not valid Lua. Instead, the
value - if not used only as a value, for instance, as a callable or indexable
object - should be wrapped in parenthesis first.
Over a series of about 15 or so commits over the last few days. Still working on import to include importing top-level constants, but that's a different concern.
enum
enum
would help with speed at runtime when checking between multiple values:INET
andConnectionType.INET
both compile to 1, so the resulting code would be similar to:enum
values may be assigned with an "initial" value; values assigned afterwards take the value of the former, adding one:Enumeration values could also be assigned after an initial assignment, and to any integer, negative or positive:
Enumeration values can't go backwards:
const
const
values are like enumerations, but only one value is assigned per statement:Unlike enumerations,
const
values can also betrue
,false
,nil
, or a string:CONSIDERATION: "%s: %s":format() is not valid Lua. Instead, the value - if not used only as a value, for instance, as a callable or indexable object - should be wrapped in parenthesis first.