lua-users home
lua-l archive

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


> Is there a reason for 'f "A"' (and 'f{}') other than saving keystrokes?
> Does that reasoning apply to other Lua types?

Not all end-users of Lua are programmers.

It means you can let users that would normally shy away from "code"
use quite sophisticated technology under the guise of a "configuration
file".

Especially the parentheses around function arguments can make a bit of
config text look like something too technical.  A lot of people appear
to be quite comfortable with using parens for grouping.  But as soon
as something like f(x) appears, it looks too much like math and is
therefore "too hard".

Funnily enough, the same people will happily learn the harder things
once they see the benefit of the application.  So having both, without
paren and with, allows you to design an interface that is easy to get
started with, but not limited.

Robby