Add varargs to maid:GiveTask to support adding multiple tasks at once
Currently, the procedure to add many items to maid is to do a repeated call to GiveTask, like so:
local a = Instance.new("Part") local b = Instance.new("Part") maid:GiveTask(a) maid:GiveTask(b)
I propose adding varargs support to :GiveTask, so that we can simply do:
local a = Instance.new("Part") local b = Instance.new("Part") maid:GiveTask(a,b)
instead, which is a lot cleaner as it fits in a single line.
For the sake of long-term support, it would probably be wiser to add the ability to provide multiple objects to clean as a table. If we were to add varargs, this could prevent the addition of custom arguments to the GiveTask method later on.
For the sake of long-term support, it would probably be wiser to add the ability to provide multiple objects to clean as a table. If we were to add varargs, this could prevent the addition of custom arguments to the
GiveTaskmethod later on.
It would probably be best to have a new method altogether, then - say maid:GiveTasks(...)
I'd be more comfortable with :GiveTasks(), but I'm not entirely sure this is something we want to do. It's really nice to keep the :GiveTask() separate.