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

boncelet at eecis.udel.edu.bbs boncelet at eecis.udel.edu.bbs
Mon Jul 17 15:40:06 EDT 2000


Bjorn Pettersen wrote:

>
> Perl, C++, Visual Basic, Java, and probably also Tcl are all more
> popular than Python. Are you suggesting we should add their special
> syntaxes/quirks just because a lot of people know them?

Not at all.  Python has a clean, simple syntax and I don't want to
clutter
it the way Perl, for one, has.  However, the Python community should
look at these other languages/domains and be willing to adopt the things

they have done right!

(The primary problem, as Huayiu keeps pointing out, is that linear
algebra
has two sets of operaters: those that work on elements and those that
work on whole matrices/vectors.  The main need is to distinguish these
two for multiplication.  If simple syntax for division--inversion--could

be defined, all the better.)

Why is it ordained that objects should have only two operations, "*" and
"+",
defined with simple operators?   "+" on strings means something entirely

different than "+" on numbers.  Why not add an "@" operator?  With some
thought, I'd wager that we could define useful meanings for []@[],
{}@{},
etc. And if not and the only problem domain that needs/wants a "@"
operator
is linear algebra, then just how much clutter are we talking about? Then
make
it available only when "import Numeric" is done.

My argument is that linear algebra is a *big* problem domain.  It should

not be dismissed as "just another problem."

Python could become the primary open source alternative to Matlab in
time
if a few changes were made: Incorporate numpy into the core distribution
(or
release a  distribution with it already embedded), simplify the syntax
for
matrix operations, and improve the help facility at the interpreter.

Matlab, of course, comes with numerous toolboxes that are unavailable in

numpy.  Early adoptors will have to write them--just as they do for
Matlab!
If you build it, they will come...

Python, because of its clean syntax, numpy, and existing
scientific/graphical tools
is better positioned than Perl, TCL, etc, to grab the linear algebra
users.

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