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

Allow object construction from object_mutation and mutate #59

Open
iboB opened this issue Mar 19, 2023 · 0 comments
Open

Allow object construction from object_mutation and mutate #59

iboB opened this issue Mar 19, 2023 · 0 comments
Labels

Comments

@iboB
Copy link
Owner

iboB commented Mar 19, 2023

Currently an object can be constructed from a type, but only if the type is composed of default-constructible mixins. If not, one must construct an empty object and immediately mutate, which will call several functions to get the domain and empty type to be immediately replaced by the one from the mutation.

It would be useful to allow providing mixin constructors to an object construction. To maintain type safety, this will involve creating several very similar types for mutations: ones which have no object, and ones that do (the latter being the current ones).

Besides the perf reasons, having this option would allow for more concise and readable code.

@iboB iboB added enhancement performance gotta go fast labels Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant