Eliminating upgrade risk

John Roth johnroth at ameritech.net
Fri Jul 27 17:37:40 CEST 2001


"Peter Hansen" <peter at engcorp.com> wrote in message
news:3B60AA24.B26F6B76 at engcorp.com...
>
> I agree the rate of change is enough to make many of us nervous
> (perhaps especially in industry).  And I agree some of the new
> features appear (from my particular point of view) unnecessary
> and more like CS playthings than anything else.
>
> That said, I have to say that at least one change is likely to
> improve my ability to produce bullet-proof programs.
>
> The surgery on the way division works will almost certainly
> reduce the risk of my accidentally (and quietly) truncating a
> result when I really meant to say float(x)/y and forgot, since
> this is an idiom I rarely need to use.  (This is leaving aside
> the issue of code breakage, but I'm talking only about new
> code here, and in my case I don't need to maintain backwards
> compatibility.)

I have to agree with you on the division mess - don't think that
what I wrote to start this thread means that I don't think it needs
to be fixed!

What everyone seems to have overlooked is that I presented
a plan for allowing the continued evolution of the language,
while providing stability for the existing code base.

What I'd actually like to see, from a bullet-proofing point of view,
is the complete elimination of the "/" operator, in favor of "idiv",
"rdiv" and "fdiv" (with the obvious meanings of integer, rational and
floating.)

Of course, this would reduce the obviousness of the language,
but it would also eliminate mistakes.

John Roth
>
> --
> ----------------------
> Peter Hansen, P.Eng.
> peter at engcorp.com





More information about the Python-list mailing list