From: Pearu P. <pe...@ce...> - 2002-03-08 15:37:29
|
On Fri, 8 Mar 2002, Perry Greenfield wrote: > It's safer, but it isn't safe. Besides, one could still do this and raise > exceptions on mixed types. Is the issue that people strongly want to do > (if both a an b are arrays) > > a.M * b (or matrix(a) * b) > > instead > > a.M * b.M (or matrix(a) * matrix(b)) > > to get matrix behavior? Just to be clear, my suggestion consisted on the following points: 1) not to introduce any new type or concept such as matrix 2) to forget the current Matrix class 3) all objects are arrays, including a.M 4) a.M has a temporary bit set only for the following operation So, with this setup there is no issue with mixed types at all and it is easy to implement. But if there will be introduced a new type, matrix, then this setup does not work. The reason why I proposed the above setup was exactly because I didn't like that a.M would return a different object type in the middle of an expresssion. Pearu |