Getting rid of bitwise operators in Python 3?

Grant Edwards grante at visi.com
Sat Sep 22 08:57:35 EDT 2007


On 2007-09-22, Carl Banks <pavlovevidence at gmail.com> wrote:

>> If you don't want to use the bitwise operations, then ignore
>> them.  Presto!  Simpler syntax.
>
> Until people no longer need to read code written by others, this argument 
> is utter bull.
>
> It's completely besides the point, anyways.  The point is to
> make the language core smaller.

Since when has the size of Python been a concern?

> It would shift code implementing bitwise logic out the core
> parts of Python, and localize it in modulespace.  It's not 
> about trying to make the mental footprint of the language
> smaller; in fact, wouldn't do that at all.

I disagree.  Making the mental footprint of the language
smaller is far more important.  The small size of the mental
footprint is what helps readability, maintainability, and
productivity.  Space in my head is more valuable than space in
my computer.

>>> Obviously, how widespread their usage is would matter.  But
>>> keep in mind it would also be easy to convert the code
>>> automatically, because the Python parser could reliably find
>>> all bitwise operations reliably.
>> 
>> The resulting code wold be fugly.
>
> Of course it would be.  The reason I mention it is that
> automatic convertibility is a key factor in whether a change
> can make it into Python 3.

It matters not whether fugly code is automatically generated or
manually generated.  It's still hard to read and maintain.

-- 
Grant Edwards                   grante             Yow!  I feel... JUGULAR...
                                  at               
                               visi.com            



More information about the Python-list mailing list