[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: omit parenthesis for functions of zero arguments /customcontrol structures
- From: Jamie Webb <j@...>
- Date: Wed, 1 Mar 2006 14:50:13 +0000
On Wed, Mar 01, 2006 at 02:23:54AM +0000, David Manura wrote:
> f = function print("hello") end -- expression form
> function f print("hello") end -- statement form
What does this mean:
function print(x) print(y) end
With your suggestion, we can't tell unless we know whether it's in an
expression or statement context. This makes code less readable and
error reporting less accurate. Not a good deal to save the occasional
pair of parentheses.
> f 123
So what does 'f -123' mean?
> f x
What does 'print(x) print(y)' mean?
-- Jamie Webb