lua-users home
lua-l archive

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


On Oct 24, 2014, at 6:30 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

>> One thing I noticed in the diff file from alpha to beta is that the quoting macros have been removed.
>> 
>> Just curious about the reasoning behind the removal of LUA_QL and LUA_QS? I did not change either macro, however, I was extending the functionality they provided with a couple of my own macros.
> 
> It seemed too complexity for little benefit. Compare:
> 
> <       lua_pushfstring(L, "\n\tno module " LUA_QS " in file " LUA_QS,
> <                          name, filename);
> ---
>>      lua_pushfstring(L, "\n\tno module '%s' in file '%s'", name, filename);
> 
> I guess everybody can live with 'filename' in their Lua error messages.
> 
> -- Roberto

Fair enough, though personally I don't think it was all that complex. Though I had wondered why the macros were used in the first place, instead of the '%s' directly in the format string as is being done now.

I do like the cleaner style of the format strings, now I will need to update my macro that used these quoting macros to dynamically quote or not.

~pmd