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 functions for making deep and shallow copies of objects #133

Open
pineapplemachine opened this issue Aug 6, 2017 · 1 comment
Open
Labels
priority: medium The issue makes it more difficult for people to use the software. type: feature The issue involves adding new or extended behavior to the software.

Comments

@pineapplemachine
Copy link
Owner

The library should provide clone and cloneDeep functions. They should specially handle sequence and consumer types.

@pineapplemachine pineapplemachine added the type: feature The issue involves adding new or extended behavior to the software. label Aug 6, 2017
@pineapplemachine pineapplemachine added the priority: medium The issue makes it more difficult for people to use the software. label Nov 8, 2017
@pineapplemachine
Copy link
Owner Author

Brainstorm idea: Perhaps these functions should have special error reporting for inputs with cyclic references in debug builds and have undefined in behavior in production builds.

Or should the clone function just go ahead and correctly handle these cases? It could add nontrivial overhead to a tool whose overwhelmingly most common use case will be to copy objects without cyclic references. Perhaps a separate function with that handling could additionally be provided, so regular clone would disallow cyclic references and cloneCyclic would handle them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium The issue makes it more difficult for people to use the software. type: feature The issue involves adding new or extended behavior to the software.
Projects
None yet
Development

No branches or pull requests

1 participant