Consider making all immutable ZTensors a subclass #8
Labels
enhancement
New feature or request
p3
Eventually useful, not on the critical path.
question
Further information is requested
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
andMutableZTensor
.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
.The text was updated successfully, but these errors were encountered: