lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 3/3/2012 9:12 AM, Greg wrote:
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.

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 }

...there are a lot of people who rely on that behavior. The latter is an awesome way to get sparse named parameters for functions, and I'm sure I'm not the only one who thinks so. ;) I even use the string syntax for translations: I define a function "_t()" and then prefix every string with it:

print( _t "this is a string that will be translated" )

Then later _t can look up the English and replace it with the appropriate translation for the locale.

Also, breaking such a core behavior means that you're walling yourself off from other Lua libraries. Which maybe you don't care about, and that's fine. But many of us do. :)

Tim