![]() |
||
|
Come now. As an imperative language, it is safe to assume that Lua will execute statements in the order listed. That is: a; b c Will execute in the order a, b, c with each statement completed before the next begins. However, the order of execution within a statements is explicitly not guaranteed: a = b() + c() Could call b() first or c() first. Similarly, table constructor expressions may be evaluated in any order (as can an _expression_ list). There are good reasons for not specifying this order, as on some architectures it is easier to do things in one order rather than another. Specifying that ‘#’ assignments are special just makes things messier: a = {1, #, 2, 3} I don’t think many people would intuitively expect # to be 3 in this case. —Tim |