Matlab vs Python (was RE: Discussion: Introducing new operators for matrix computation)

Paul Prescod paul at prescod.net
Thu Jul 20 10:30:31 EDT 2000


John Lull wrote:
> 
> ...
>
> It has no advantage on a simple expression like this, assuming a and b
> provide newOp() and otherOp() respectively.  The advantage only shows
> up on complex expressions, where the functional notation can make it
> much more difficult to read, or in a case where b.__otherOp__()
> provides __rnewOp__().

Well, if there is any possibility of a name-based system "winning" then
I am strongly in favor of it. You could make it a little shorter by
using ~ instead of ..

~elMul~
~matMul~
~newfunc~

I think that that would be very extensible and reasonably readable. If
the word in the middle could be a re-assignable name then you could say:

eM=elMul

a ~eM~ b

-- 
 Paul Prescod - Not encumbered by corporate consensus
"Hardly anything more unwelcome can befall a scientific writer than 
having the foundations of his edifice shaken after the work is 
finished.  I have been placed in this position by a letter from 
Mr. Bertrand Russell..." 
 - Frege, Appendix of Basic Laws of Arithmetic (of Russell's Paradox)




More information about the Python-list mailing list