Dave Burt wrote:

> Michael Ulm wrote:
> 
>>
>>I think he's trying to say, that there is no rational reason for
>>leaving out the []= operator, and I agree.
> 
> 
> 
> The benefit is that you can assume no other code is modifying your matrix.
> 
> n = Matrix.I(2)
> some_function(n)
> p n # same as before
> 
> It's a good feature.

You are right, this is a somewhat useful feature (I've been bitten often
enough by mutated Arrays). However, this only works as long as some_function
is not a third party application (or calls a third party library).

So it's a balance of conveniences. For me, the usefulness of []= far
outweighs any advantages of the present implementation.

> 
> []= would be useful, too, but I think to keep the immutability a better
> addition that provides the same functionality could be provided; a
> modified_at(x,y,value) method or something, but naming it is hard.
> 

Then the whole Matrix would have to be copied to change one value --
goodbye performance.

Regards,

Michael

-- 
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: michael.ulm / isis-papyrus.com
Visit our Website: www.isis-papyrus.com

---------------------------------------------------------------
This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS accepts
no responsibility for malicious or inappropriate content.
---------------------------------------------------------------