PEP0238 lament

Steve Horne sh at ttsoftware.co.uk
Mon Jul 23 08:50:51 EDT 2001


On Mon, 23 Jul 2001 03:26:52 -0400, "Tim Peters" <tim.one at home.com>
wrote:

>[]Stephen Horne]
>> ...
>> And what about the languages web developers are used to, such as
>> VBScript and JavaScript.
>
>Good thing you stopped before mentioning Perl (yes, 1/2 is 0.5 there) -- I'm
>afraid the "mimic other languages" approach requires picking languages very
>carefully if you want the illusion of consistency.  By the way, 1/2 is also
>0.5 in standard JavaScript:

My mistake. However, the overwhelming majority of code is written to a
pattern where 1/2=0 - the simple fact Visual BASIC does it almost sets
the standard itself - and C, C++ and Java are hardly obscure.

I think you'll find it's the picking of languages where 1/2 = 0.5 that
has to be done carefully - I can think of Pacal, Modula 2, LISP and -
taking into account your correction - Perl and JavaScript. The last to
are enough to prove that your *opinion* is valid, those are not in use
to anywhere near the same extent as languages like C, C++, Java and
BASIC.

>produce-enough-frantic-arguments-at-random-and-some-are-likely-
>    to-backfire<wink>-ly y'rs  - tim

This argument still holds well enough on its own to prove that
changing the division operator is *not* an *undeniably* good thing -
it is at best a matter of opinion. *THAT* is all I need to prove - and
I have done so with several different arguments.

Furthermore it is not a random argument - it is a genuine concern with
no less validity than those in favor of 1/2 being 0.5.

Had Python started out differently, I'd still disagree but I wouldn't
be making a big issue. But this is a code-breaker of the worse kind -
it will create bugs in trusted programs that have been relied upon for
years without problem, which the programmers have forgotten about (if
the programmers are even still in the company) - and many of the bugs
may not even be obvious when they occur. And it will happen a *lot* -
division is *not* some obscure rarely-used feature, it is a basic
arithmetic operation.

The reward for advocating Python is apparently that you get to look a
complete idiot in front of your boss when everything you've written
goes pear shaped - *just* the kind of thankyou all the Python
advocates have been looking for, I don't think.

-- 
Steve Horne
Home : steve at lurking.demon.co.uk
Work : sh at ttsoftware.co.uk



More information about the Python-list mailing list