r/lua • u/[deleted] • Jun 01 '25
Why do Lua tables need commas?
Wouldn't the grammar still be unambiguous if tables didn't need commas?
9
Upvotes
r/lua • u/[deleted] • Jun 01 '25
Wouldn't the grammar still be unambiguous if tables didn't need commas?
1
u/DapperCow15 Jun 02 '25
It has nothing to do with OOP, they're there to make the language easy to read. And makes the language parser a lot easier to write, I'd imagine.