Module talk:FrameTools

Varargs
I'd like to explain my recent changes to this module. They're all small adjustments that bring it more in line with the style guide, but I think [&diff=prev this edit] might need a bit of context. In it, I changed a three instances of  to   (an ellipsis).

In Lua 5.0,  was a hidden parameter, a table, that contained everything passed to a variadic function. The first (and free) edition of Programming in Lua goes into more detail in section 5.2 – Variable Number of Arguments, but basically:

{ "one", "two", "three", n = 3 }

However, this feature was replaced in Lua 5.1:

The vararg system changed from the pseudo-argument  with a table with the extra arguments to the vararg expression. (See compile-time option  in  .) &mdash;Lua 5.1 Reference Manual

I think it's a little odd that it still works in our version of Scribunto. Maybe they only deprecated, instead of removing it outright? Or maybe the MediaWiki folks patched it back in, for some reason?? Either way, it's outdated and we probably shouldn't use it. Since that PIL reference is obsolete, here's a much better one: Vararg The Second Class Citizen.

DarthKitty (talk) 23:03, January 19, 2016 (UTC)