|
On 04/03/2012 0.59, Greg wrote:
I've almost got lost in the thread, but it seems no one has mentioned DSLs (Domain Specific Languages).Feel free to create a patch and use it yourself, but don't expect a lot of people to support losing such a core feature. Even if you never say: foo "bar" or foo{ bar=1 }I agree that this is pretty nice. It don't use it nearly as often as I use commas. My average Lua file has over 200 commas and not many instances of foo{ bar=1}. I usually only this with require statements. Ex: require "utils" - Greg
Lua is awesome in this respect. Without being able to omit parentheses in the case of a single string/table, any Lua-based DSL would look much clumsier. Compare:
BeginSection [[news]] Link "C-programming" {href = "etc.", title = "a book on C"} Link "I love Lua" {href = "etc.", title = "an essay"} EndSection()which is legal Lua syntax now, would become fairly ugly with mandatory parentheses!
I wouldn't really forfeit this ability in exchange for the "optional comma": too big a loss for little reward IMO.
Cheers. -- Lorenzo