On Aug 29, 2014, at 9:03 PM, Andrew Starks <andrew.starks@trms.com> wrote:
I'm curious about why it is not possible to do something like:
`function o.method(self, fun, ...)
success, ... = pcall(fun, ...)
--vararg now return values of fun
-etc.
end
`
I assume this has been a topic, because its use would be pretty obvious. I couldn't come up with anything via the googles, so could someone point the way to where this was discussed?
-Andrew
You can of course use table.pack() to capture vararg return values, which allows you to do what you want indirectly, ]...]