dynamix
dynamix copied to clipboard
Allow object construction from `object_mutation` and `mutate`
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.