Matlab vs Python (was RE: Discussion: Introducing new operators for matrix computation)
Gordon McMillan
gmcm at hypernet.com
Mon Jul 17 23:11:34 EDT 2000
Huaiyu Zhu wrote:
>On 17 Jul 2000 23:19:16 GMT, Gordon McMillan <gmcm at hypernet.com> wrote:
>> PyAlgebra.evaluate(r'(A .* B)\C', A=A, B=B, C=C)
>Good point. So let me say why I do not like this. (Doesn't mean it has
>to die.) :-)
>
>In a program where there are a lot of computations, you'll get either
>something like a ritual on every line,
>
>PyAlgebra.evaluate(r'(A .* B)\C', A=A, B=B, C=C)
>PyAlgebra.evaluate(r'(A .* B)\C', A=A, B=B, C=C)
>PyAlgebra.evaluate(r'(A .* B)\C', A=A, B=B, C=C)
[snip]
>or you get
>
>PyAlgebra.evaluate(r'(A .* B)\C
> (A .* B)\C
> (A .* B)\C', A=A, B=B, C=C)
>
>Everybody would rush for the latter. In the end what's inside the quote
>would be a minilanguage with all the bells and wistles of python. This
>would be just similar to patching the parser, with lesser results.
It would be exactly what SQL and regular expression users deal with every
day. I'm sure some ex-Perlers wish that regexes were "first class" objects,
but there's little noise about it; and none whatsoever from SQL users.
And you get the advantage that you can use the same syntax Matlab uses.
-Gordon
More information about the Python-list
mailing list