-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow table.clone to copy tables with locked metatables #88
base: master
Are you sure you want to change the base?
Conversation
Would it be intuitive for a metatable to only sometimes be copied? |
Yes |
I haven't finished this yet because I haven't resolved 2 of the issues levied yet. |
Done |
I don't fully understand the motivation here. Why would JSONEncode need to clone the table, as opposed to using rawget et al? Why would you want to JSON serialize something with a locked metatable? The downside is that this RFC proposes changing
One alternative I could see that is perhaps more sensible is But beyond everything else I think this RFC needs a use case that is actually clear and not adequately solved today. |
Allow
table.clone
to copy tables with locked metatables.Rendered
This is a remake of the original poorly done RFC #73 . The issues in the original RFC have been fixed and the ambiguities have been clarified.