Discussion: Introducing new operators for matrix computation

Bjorn Pettersen bjorn at roguewave.com
Fri Jul 14 13:47:23 EDT 2000


John Lull wrote:
> 
> At the dawn of the third millenium (by the common reckoning), Bjorn
> Pettersen <bjorn at roguewave.com> wrote (with possible deletions):
> 
> > It seems like you're trying to create a special purpose language here.
> > Ie. I don't see it as general enough to be worth putting into the core
> > unless you can come up with other use cases... Personally, I would much
> > prefer the ability to overload the relational operators (individually,
> > not through __cmp__).
> 
> I'd like to disagree here.  Matrices & linear algebra are fundamental
> tools in an extremely broad set of domains.  Unfortunately, most
> programming languages don't seem to recognize that.
> 
> Providing appropriate operators in the core is, IMO, as appropriate as
> providing complex numbers.  Providing an easy way to effectively add
> them to the core when you install an appropriate add-on package is a
> reasonable alternative.  Their absence leads to really hard-to-read
> code, and to me is a significant downside to Python.

That is the problem with a general purpose language. It can't
conveniently spell the common syntax for all possible special domains.
I'd be very hesitant to make Python's core more complex just to make it
easier to use in _one_ problem domain. (Note: I'm not saying I would be
against a proposal that would be more generally useful... but you'll
have to prove that first)

As a programmer that has never used complex numbers for anything useful,
I'd much rather remove them from Python than add special linear algebra
syntax <wink>

-- bjorn




More information about the Python-list mailing list