Which would you prefer?

Miscellaneous Forums/General Discussion/Which would you prefer?

Been bored, creating stuff on my days off work. For instance in say a matrix class, would you rather:

Have it so that when you call something like Matrix.Product(SomeOtherMatrix) it returns the result in a new matrix, or saves the result in the base type (the one that called the method) and returns the matrix?

Just wondering what you'd prefer.

returns a new matrix

What he said.

Excellent!

Returns a matrix, that I can allocate to a new matrix if I want to

That is it doesnt create a new matrix unless I allocate it to something. So specificaly A loclal Temp matrix in Method Product, that is returned. (Maybe this is what you ment by "result in a new matrix", but just making sure