new bitwise module [was Re: Discussion: new operators ...]

Christian Tanzer tanzer at swing.co.at
Wed Aug 2 02:02:59 EDT 2000


hzhu at users.sourceforge.net wrote:

> On Tue, 1 Aug 2000 19:02:11 -0400, Tim Peters <tim_one at email.msn.com> wrote:
> 
> >That nobody expressed outrage strongly suggests that the "new operators"
> >thread and its offshoots have gone on at such length that only a few are
> >following them anymore.  So at this point a PEP seems the only way to get
> >others to even *see* the idea.
> 
> Oh, another explanation is that those who are against infix math operators
> find their arguments better suited for infix bitwise operators. <0.5wink>
> 
> >I could have sworn that just two weeks ago you were passionately arguing
> >that named functions are intolerable for *your* field of interest <0.7
> >wink>.  So be sure to explain why they're better than infix operators for
> >those who like slinging ints.
> 
> Well, the benefit does not show much for those who like slinging ints.  The
> overall benefit to all others, including though who sling ints occasionally,
> comes from the elimination of a large proportion of builtin operator syntax
> (complete with special symbols and precedence rules).

Well, I was pretty neutral in the math operator case
-- no reason to join a debate that had too many posts already.

Removing operators from a language is another topic, though.

If you started afresh on the design and implementation of a new
language, there might well be compelling arguments to include matrix
operators and exclude bitwise operators.

But Python had bitwise operators for years (probably from day 1) and
they are used in tons of code. Contrary to naive expectations, it is
impossible to use a simple sed script to rewrite the existing code to
use named functions instead of bitwise operators.

As to the benefits of bitwise operators: you are doing the case of
matrix operators a disservice by disregarding other Python user's
needs. You were not amused when others were unimpressed by the
concerns of MatPy users.

Don't-throw-stones-at-other-people's-glass-houses-ly y'rs,
Christian

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list