Skip to content

Conversation

@mbartlett21
Copy link
Collaborator

This should make using # for the length of a PackTable do the right thing.

Also changed both the table.pack definitions to return PackTable<T>.

Also changed both the table.pack definitions to return PackTable<T>
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Teal Playground URL: https://1065--teal-playground-preview.netlify.app

@hishamhm
Copy link
Member

hishamhm commented Jan 9, 2026

This is interesting, but it does deviate from Lua semantics, right? table.pack doesn't set an actual metatable on the return value.

I think a case could be made that we can get this at "zero-cost" in a compiled language, but I'm not sure we ever changed the behavior of Lua standard library functions in Teal apart from compat stuff.

Curious to hear how people feel about this!

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