[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Thoughts on optional commas
- From: Greg <tghill@...>
- Date: Sat, 3 Mar 2012 16:12:36 +0000 (UTC)
> I would personally not like as it makes the syntax inconsistent, in this case
sometimes it is mandatory and
> sometimes it isn't. Consistency has a lot of benefits.
I too am a big fan of consistency. We would be more consistent (IMHO) if we
dropped the option of no parentheses from function calls. I think we could then
remove commas from the language (or at least make them optional).
function test(a, b, c)
print "note"
for i,v in ipairs(a) do
b = {1, 2, 3, "boom", {4,5,6}, }
end
return a, b, 15, "ok"
end
could become
function test(a b c)
print("note")
for i v in ipairs(a) do
b = {1 2 3 "boom" {4 5 6} }
end
return a b 15 "ok"
end
This feels much cleaner and consistent to me.
- Greg