Skip to content

table.drop & linter improvements for table.remove - #249

Open
InfraredGodYT wants to merge 15 commits into
luau-lang:masterfrom
InfraredGodYT:table-drop
Open

table.drop & linter improvements for table.remove#249
InfraredGodYT wants to merge 15 commits into
luau-lang:masterfrom
InfraredGodYT:table-drop

Conversation

@InfraredGodYT

Copy link
Copy Markdown

@InfraredGodYT

Copy link
Copy Markdown
Author

My mistake, used an old fork. Ignore the previous commits.

@InfraredGodYT
InfraredGodYT marked this pull request as draft August 23, 2026 02:56
@InfraredGodYT
InfraredGodYT marked this pull request as ready for review August 25, 2026 16:53
Might edit these into the RFC itself depending on feedback.

@nnullcolumn nnullcolumn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops forgot to submit lol

Comment thread docs/table-drop.md Outdated
Comment thread docs/table-drop.md Outdated
Comment thread docs/table-drop.md Outdated
Comment thread docs/table-drop.md Outdated
Comment thread docs/table-drop.md Outdated
Updated the proposed function signature from `max` to `count` & corrected some typos. Accounted for the use of `assert` to prevent the current footgun with `table.remove`.
Updated the table.drop function to return the number of removed elements and specified errors for readonly tables or `count` values <= 0. Enhanced the linter warning for table.remove with a more clear warning message & better semantics.
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

Successfully merging this pull request may close these issues.

2 participants