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

Consider making all immutable ZTensors a subclass #8

Open
crutcher opened this issue Feb 26, 2024 · 0 comments
Open

Consider making all immutable ZTensors a subclass #8

crutcher opened this issue Feb 26, 2024 · 0 comments
Labels
enhancement New feature or request p3 Eventually useful, not on the critical path. question Further information is requested

Comments

@crutcher
Copy link
Owner

When using ZTensors as part of immutable datastructures, it is useful to have solid requirements that they are treated as immutable objects.

Currently, this is done by construction enforcement (t.asImmutable()); or by immutable wrapper classes (ZPoint, ZMatrix).

conceivably, there could be two subclasses of ZTensor, FixedZTensor and MutableZTensor.

Properly handled, algorithms which didn't need to know/care could be written for the base type (ZTensor).

Achieving this would require some recursive template dancing, and private static dispatch constructors which switched on mutable.

@crutcher crutcher added enhancement New feature or request question Further information is requested p3 Eventually useful, not on the critical path. labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3 Eventually useful, not on the critical path. question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

1 participant