Discussion: new math operators

Huaiyu Zhu hzhu at knowledgetrack.com
Fri Jul 21 22:48:01 EDT 2000


On Sat, 22 Jul 2000 02:11:54 GMT, Neil Hodgson <neilh at scintilla.org> wrote:
>> ...  Surprisingly (maybe not,
>> considering the math-oriented constituency), the third option draws the
>most
>> praise and almost not criticism.  It has more variations and have more
>> potential for the future.  Despite that, imo, it is unlikely to be
>accepted
>> eventually, because it would not play well with by non-math audience.
>
>   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.

I just posted a summary that dismissed this idea before seeing recent two
posts favoring brace based operators.  It's becoming increasingly obvious
that most discussants here favor this. Yes, I agree with all the advantages
of this.

Now the questions are:

1. How do we test reactions from people who do not read this thread?  Anyone
volunteer to give a try?

2. How important does the possible future extension play in this?  What
considerations should be put in this?

3. If there could be future calculus of operators, would we now favor (*)=
or (*=) for augmented assignment?

These questions come up because this is clear a new type of language
structure, even though it only contains one or two characters at the moment.  

We might be opening a whole can of worms here.  I have no idea of the future
perspective of the acceptance.  Are we asking too much, or are we trying to
be as consistant as possible, or both?  Perhaps someone else need to step up
to take the lead in this discussion.

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

This would be extremely helpful.

Huaiyu




More information about the Python-list mailing list