lua-users home
lua-l archive

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


On May 18, 2013, at 6:49 PM, Andres Perera wrote:

> On Sat, May 18, 2013 at 5:35 PM, Tim Hill <drtimhill@gmail.com> wrote:
>> But such a change is a MUCH deeper change to Lua than just making it easier to write the local declarations. Tables have no existence at compile time in the current model, hence the concept of "{}" as a table CONSTRUCTOR and not a table LITERAL.
> 
> The change is that a set of table constructors can now be asked to
> give a maximum number of members, at CT. Non-constant tables return
> "undeterminate". The prodding for maximum number of members happens
> when the `from' operator is parsed.

require() happens at runtime, not compile-time. You'd have to switch to semantics closer to  #include, I think. @splicing in an external AST would be cleaner and work as well.

Jay