Lets say I’m making a class. I have the option of giving the constructor a table of constructor arguements, or a variadic function, such as:
function Class.new(...)
local Args = ...
end
function Class.new(Data)
local Args = unpack(Data)
end
Both ways are variadic in a way. If “Data” is an array of comma separated strings for example (like seen in the print global), we don’t have to update our constructor code in anyway to accomodate anything else in the Data table which is passed, which is the same for the variadic syntax.
So, while I find variadics more aesthetic, I’m curious to the solid things that make them different.