Matlab vs Python (was RE: Discussion: Introducing new operators f

hzhu at localhost.localdomain.bbs hzhu at localhost.localdomain.bbs
Mon Jul 17 21:00:04 EDT 2000


On 17 Jul 2000 23:19:16 GMT, Gordon McMillan <gmcm at hypernet.com> wrote:

>I proposed something very similar to Huaiyu the other day:
>
>  PyAlgebra.evaluate(r'(A .* B)\C', A=A, B=B, C=C)
>
>I know Thomas Wouters did, too. I haven't seen a post reflecting these
>suggestions.

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)

for what could be

(A .* B)\C
(A .* B)\C
(A .* B)\C

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.

>In fact, looking at this thread in one of those tree-view newsreaders, it
>becomes obvious that branches die when a proposal is made, but arguments
>are met with vehement counter arguments. Which leads me to believe that:
>
>>Silly idea 3:
>>
>>  Lets continue arguing until everyone, both pro and con, gets
>>  irritated,
>>starts calling each other Nazis and gives up.
>
>...has already won.

You got it.  I'm making a resolution of not going down that road from now on.

Huaiyu



More information about the Python-list mailing list