[Python-Dev] Re: request for minor enhancement / linear algebra
Fri, 14 Jul 2000 11:49:12 -0400 (EDT)
> > Greg: So let's adopt the notation '<?' and '>?' for 'min' and
> > 'max', as used in C* and other parallel languages. We can
> > then use '<?=' and '>?=' for the infix forms, and reserve
> > 'min()' and 'max()' as built-ins for the variadic forms.
> > After all, it's just an historical accident that 'min' and
> > 'max' aren't treated with the same respect as '+' and 'or'.
> Eric Raymond:
> I would support something like this. What's really going on here,
> IMO, is that you're groping towards giving Python a complete set of
> notations for lattice algebra. My mathematician head likes this
I was actually trying to convince people that adding operators one by one
(even well-defined ones that lots of people would use) would be a bad
idea. Our two main reasons for choosing Python for Software Carpentry were
its simplicity (it can be taught quickly) and its availability (widely
portable, open source). I (and my customers) would enjoy doing matrix
algebra using mathematical notation in Python, but one-at-a-time
extensions are going to reduce the chances of people choosing Python for
their projects. Saying, "But you don't have to use these new operators if
you don't want to," is a red herring --- if I want to understand/modify
other people's code, I'll have to learn 'em (just as I've had to learn
most of Perl's syntax, one painful special case at a time, in order to use
the LDAP, XML, CGI, and imaging libraries).
So: I would like this (linear algebra, min/max, other notation) to happen,
but only if there's an extensible, scalable framework for user-defined
libraries to add operators to Python, in the same way that they can now
add new classes. "Extend, or extend not --- there is no special case."