forsyth@minster.york.ac.uk (08/16/89)
one approach that i have not seen suggested here is to have the overloaded operators build a tree describing the calculation & defer the evaluation until the value is required (eg, by assignment). the expression evaluator can see the context and avoid the deplorable copying of large objects. this might be appropriate when the cost of transforming and interpreting the expression is less than the cost of creating temporary values needlessly. i have not considered doing this for matrix operations (as such) but rather for bitmap/image manipulation operations, perhaps in the style of: %T A Language for Bitmap Manipulation %A L. J. Guibas %A J. Stolfi %J ACM Transactions on Graphics %V 1 %N 3 %D July 1982 %P 191-214 whether it saves time obviously depends on the size of a matrix. a hybrid scheme might be attractive.