[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are parenthesis-free calls a Good? (was Re: patch: C-style string
- From: Robert Raschke <rrlua@...>
- Date: Thu, 31 Jan 2008 17:14:18 +0000
> 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