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

Feature request: settings map identical? #830

Open
AlexKnauth opened this issue Aug 10, 2024 · 1 comment
Open

Feature request: settings map identical? #830

AlexKnauth opened this issue Aug 10, 2024 · 1 comment

Comments

@AlexKnauth
Copy link
Contributor

AlexKnauth commented Aug 10, 2024

Either provide a function to tell whether two settings maps are identical, or guarantee that the integer handles are equal whenever the maps are identical.

I don't expect this "identical" operation to be used for implementing the Eq trait == on the auto-splitter side. My intended use case would be to allow a load_if_changed function on the auto-splitter side.

For example:
I load the settings map and call it A, and then load it again on a future tick and call it B.
If the settings map has been unchanged for that time, then either A and B should be different handle integers but which "identical" returns true for, or they should be guaranteed to be the same handle integer, in which case there would be no need for a special "identical" function.

@AlexKnauth
Copy link
Contributor Author

Complication: if "the settings map" has been unchanged, but A has been changed by the auto-splitter, it would be wrong for the 2nd load B to have the same handle integer as A.

Related complication: if an auto-splitter loads A, then loads B which is unchanged, and then mutates A. They would not expect B to be changed.

So maybe making the integer handles equal is a bad idea, and an "identical" function is needed after all.

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

No branches or pull requests

1 participant