View Single Post
09-30-16, 06:30 PM   #5
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
select is never "ideal". There are a few cases where it's required (namely, dealing with an argument list of unknown length), anything else is purely a matter of readability.

I would definitely do this, for example:
Code:
if select(10, returnStuff()) then
rather than
Code:
local _, _, _, _, _, _, _, _, _, x = returnStuff()
if x then
unless you're going to be calling it very frequently.
__________________
Grab your sword and fight the Horde!

Last edited by Lombra : 09-30-16 at 06:33 PM.
  Reply With Quote