lua-users home
lua-l archive

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


On Mon, Mar 5, 2012 at 12:07 AM, Eric Wing <ewmailing@gmail.com> wrote:
> I'm going to stick up for Greg and agree with him on both these points:
> - Commas are generally the more common case
> - Consistency is better than compromise (i.e. applying only to
> associative arrays only vs. arrays is a bad idea). (I would say this
> compromise would not be worth doing at all.)
>
> As an aside, I never cared much for the current inconsistency in the
> rules of omitting parenthesis.
>
> -- Valid
> print "foo"
> print { }
>
> -- Error
> print 2


I don't see print 2 as an inconsistency.  Lua doesn't account for
whitespace in it's grammar, which is what print 2 would need since
print2 is an identifier where as print"2" is clearly an identifier
with a string.

wes