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

Charles Boncelet boncelet at eecis.udel.edu
Mon Jul 17 16:03:20 EDT 2000


Bjorn Pettersen wrote:

> 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).

Not trying to be argumentative, but why not?  Why not allow an
additional, overloadable, operator?

>  - The proposal is to add a handful of operators that would only
>    have meaning in this one domain.
>    - the criteria for addition to the core is something that is
>      generally useful for a large segment of the community.
>      (and it's your job to convince us of it, not ours to
>      convince you that it isn't -- many more people would like
>      to see Stackless in the core, but that's not going to happen
>      anytime soon either...)

I'd love to see stackless and += added.

>    - that many problems can be reduced to matrix operations is
>      a non-argument, since the same is true of functional/
>      procedural/oo/predicate programming.

I agree, but there is a big userbase waiting for an alternative
to the $$ Matlab.

>  - There are allready ways of performing the required tasks in
>    Python, so there is no absolute need to add this to the core.

The same can be said of any simplification.  There is no need for
it, but adding it may make life a lot easier.

>  - Other straight forward solutions has been proposed including
>    list comprehensions and Moshe Zadka's elementwise class
>    approach.

This I must object to.  Linear algebra often involves big objects. 
These operations want to call a carefully written C function.  Any
time you use Python to loop over matrix objects, you are dead in
a big problem.  As far as I understand (and I could be wrong) 
neither list comprehensions nor the elementwise approach would be
able to call the underlying C functions without python loops.
> 
> > On the other hand, alternative arguments based on analysis of functionality,
> > overall design, history of evolution and possible future extension, etc,
> > would carry some real persuasive weight.
> 
> 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).

This may be Hauiyu's argument, but it is not mine.  I'll let the
people working in other domains to give the examples for their
domains.  My argument is that there is a very large potential user
group Python could address if it were improved slightly (for that
domain.)

-- 
Charles Boncelet                              302-831-8008
Dept of Electrical and Computer Engineering   302-831-4316 (fax)
University of Delaware                        boncelet at eecis.udel.edu
http://www.eecis.udel.edu/~boncelet/



More information about the Python-list mailing list