Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add varargs to maid:GiveTask to support adding multiple tasks at once #139

Open
sayhisam1 opened this issue Feb 2, 2020 · 3 comments
Open

Comments

@sayhisam1
Copy link

sayhisam1 commented Feb 2, 2020

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.

@devSparkle
Copy link
Contributor

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.

@sayhisam1
Copy link
Author

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.

It would probably be best to have a new method altogether, then - say maid:GiveTasks(...)

@Quenty
Copy link
Owner

Quenty commented Sep 8, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants