Discussion: new math operators

Tim Hochberg tim.hochberg at ieee.org
Fri Jul 21 22:53:52 EDT 2000


"Neil Hodgson" <neilh at scintilla.org> writes:

>    As one of the more reactionary Pythoneers with regard to syntax changes
> and as someone who is unlikely to ever need to use the new operators, I say
> the braced operators are the best.
> 
>    The .* style operators merge with the surrounding expression in a way
> that leads to me confusing whether they are interpreted with their normal
> meaning. The braced operator sequences like (*) merge together into one
> visual entity. When encountered by someone for the first time, its fairly
> obvious that they mean something new and not just a weird way of spelling a
> current operation.
> 
>    The braced operators give a reasonable basis for future expansion
> although it looks like you have used up all the best ones already. If this
> is going to be used for future expansion, I'd like to see precedence looked
> at closely now with all braced operators at lowest precedence.
> 
>    It may help to write a short demonstration script that intensively uses
> matrix operations to show what code based on these proposals will look like.

I agree. When I try to channel to the general Python user base on this
issue (a dubious undertaking at best), I see @* operators coming in
last, hands down (line noise, P***like), .* and (*) are much closer,
but I see (*) coming out ahead due to the reasons that Neil mentions
above.

However, the fact that this result matches my preferences, while
Huaiyu believes the reaction would be the opposite, in line with what
seems to be his preferences is probably no accident. It's be easy to
check though: as Neil suggests, we should write up the example scripts
and then we could solicit opinions from the general python users as
well as the numeric crowd.

-tim



More information about the Python-list mailing list