[Python-3000] What makes infix operators special? (was Re: Type parameterization

Greg Ewing greg.ewing at canterbury.ac.nz
Sun May 21 12:29:51 CEST 2006


Nick Coghlan wrote:

> Using '@' would now be fairly counterintuitive, given that symbol's 
> association with decorators.

It would be very disappointing if @ were now considered
too "polluted" by association with decorators to be used
for anything else, since it would mean we have lost both
a potential prefix operator and a potential infix operator
in one go.

Personally I don't think there would be any confusion.

> I wonder if something could be done with the idea of using additional symbol 
> pairs for operators. Then something like '*.' could added for the vector 
> scalar product (aka the dot product), and '*~' could be added for matrix 
> multiplication.

No, no, please, no!!! Things like this were debated at
length last time round, and were found to be extremely
ugly and hard to read.

> However, I also wonder if that way lies madness ;)

Indeed, it does. Even brief exposure to expressions
containing *. operators has been found to cause severe
mental derangement in laboratory rats. We don't want
to go there.

--
Greg


More information about the Python-3000 mailing list