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

Mutability issues #7

Open
BigBang1112 opened this issue Jun 20, 2023 · 1 comment
Open

Mutability issues #7

BigBang1112 opened this issue Jun 20, 2023 · 1 comment

Comments

@BigBang1112
Copy link
Member

BigBang1112 commented Jun 20, 2023

When it comes to idea of conversion (modification) of Gbx, node mutability is most often used to simplify the work.

However, this mutation persists in the stored GbxModel, creating an unnatural behavior of outputting mutated Gbx, while the inputted Gbx was also modified.

Potential fix: Deeply clone input parameters by default, and optionally suppress this behavior with [ImmutableParameter] provided by the developer (to increase performance). Known fully immutable types shouldn't require this parameter.

Outside of Produce and Proceed, there could be also an option for Modify which would adjust the UI better to the user knows the Gbx was modified in place.

@BigBang1112
Copy link
Member Author

BigBang1112 commented Aug 3, 2023

It is also possible to solve temporarily by using the Gbx memory stream to parse it on individual tool instance. GBX.NET node cloning would be much preferable option though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant