PEP0238 lament
Myles
myles at geocities.com
Mon Jul 23 22:41:13 EDT 2001
Stephen Horne wrote:
>
> On Mon, 23 Jul 2001 17:05:34 -0500, <mcherm at destiny.com> wrote:
>
> >> 1/2 == 0.5:
> >> Perl -- untyped, thus irrelevent
> >> LISP -- academic language only
> >> Pascal -- the Ada folks thought it was wrong
> >> Modula 2+ -- Minority languages
> >> JavaScript -- dumbed down language
> >> 1/2 == 0:
> >> Visual BASIC -- most used language 3 yrs running
> >> C -- what need I say?
> >> C++ -- ditto
> >> Java -- ditto
> >> Ada -- intentionally changed the Pascal practice
> >> VBA -- most used non-programmer language
[snippery snip]
> VB is based on BASIC, which has a variable history but which in the
> early days generally did 1/2 -> 0.5, and generally *changed* it later
> on.
Ermm, fact correction :
not on the VB and VBA I have available to me.
VB (admittedly v.4):
x = 1 \ 2
MsgBox (x)
gives 0.5
VBA (in Excel 97):
Worksheets("Sheet1").Activate
Worksheets("Sheet1").Range("B5").Activate
ActiveCell = 1 / 2
gives 0.5
A quick peek through the helpfiles for both reveals that integer
division for the "most used language 3 yrs running" and for the "most
used non-programmer language" actually uses a different operator "\" for
integer division, in a similar manner to the proposal for Python ! :-)
We now return viewers to the main argument :
"Are the benefits worth breaking backward compatibility, and will the
change process in place be sufficient to manage this ?"
Regards, Myles.
More information about the Python-list
mailing list