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

Huaiyu Zhu hzhu at localhost.localdomain
Mon Jul 17 15:42:18 EDT 2000


On Mon, 17 Jul 2000 13:24:30 -0600, Bjorn Pettersen <bjorn at roguewave.com> wrote:
>> As to the claim that additional operators for linear algebra is somehow
>> comparable to the special syntaxes/quirks of various programming languages,
>> no real argument has been presented so far.  It's more like: If I don't care
>> and don't use such things, they must belong to a special domain and be
>> somehow comparable to some other things that I do know and dislike.
>
>On the contrary. The argument is something like the following:
>
> - Python is a general purpose language, and as such it can't
>   support special case syntax for Matrix/cgi/xml/db programming.
>   (special syntax has previously been requested for both cgi and
>   db programming).

I don't see what this tells me about Matrix being comparable to cgi/xml/db,
especially on the level of syntax requirements.

>If you really want to convince people, I would like to see examples of
>how adding these operators would make working in other domains easier
>(directly, not through translation through linear algebra).

I'm not sure what this is asking for. My first impression is similar to
"show me an example of how using C syntax would make working in assembly
easier (directly, not by compiling a C program)".

On second thought, maybe you are thinking about situations like: when doing
web programming you want to add server statistics and put the graphics on
the page?  Of course it helps, but you have to translate the numbers into
linear algebra.  I don't think these arguments leading anywhere.

Or maybe you want this?

a = ["Alice", "Bob"]
b = " is "
c = ["a girl", "a boy"]
d = a .+ b .+ c

If the request had been: if you really want to convince people that string
literals are worth having in the language, you need to give examples of it
make working in other domains easier (directly, not through translating
through strings), I would have exactly the same reaction.  Strings are good
for text.  Even though you can use regular expression to calculate pi to any
place you want, which is another domain, that's not the reason strings are
the language.

The morale of the arguement is: requiring every syntax to be useful in every
domain is too extreme and not quite useful.  But considering exactly what
the domain is and exactly how it might be used may help.

Huaiyu



More information about the Python-list mailing list