lua-users home
lua-l archive

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

I'm happy with the table constructor allowing an extra delimiter precisely
because {a,b,c}, {a,b,c,} and {a,b,c,nil} all do the same thing, and I am
not happy with the original proposal because for f(...), the difference
between f(a,b,c) and f(a,b,c,nil) can be detected by select('#',...).

This is a strawman you created yourself you are now tearing down. There is not implicit nil, there never was, it is not in the proposal and if there ever will be, it will be no difficulty to properly define where implicit nils will be inserted, as been explained, never more nils than there are commas.

( Instead of implicit nils, I'd rather have the comma completely optionally implicit, that would be very nice for Lua data files. but unfortunately there are cases where this might be ambiguous, like the unary minus, or the lua function call semantics without brackets. Thus I could not suggest that)