Python's biggest compromises

Terry Reedy tjreedy at udel.edu
Thu Jul 31 15:19:01 EDT 2003


"Anthony_Barker" <anthony_barker at hotmail.com> wrote in message
news:899f842.0307310555.56134f71 at posting.google.com...
> What to you think python largest compromises are?

A compromise is an in-between position or decision.  Example: wife
wants to go to a horse show, husband to an auto race, so they
compromise and go to a horse race.

> The three that come to my mind are significant whitespace, dynamic
> typing, and that it is interpreted - not compiled.

The first two are end-point positions, not in-between compromises.
The third is a matter of definition and implementation.  CPython
compiles to version-dependent but otherwise portable PyCode.  PyRex,
Weave, and Psyco all compile to C or machine code.

> These three put  python under fire

Anything can bo put under fire by anyone who wants to shoot.

> and cause some large projects to move off python or

This sort of statement remains an opinion or impression until backed
by evidence.

> relegate it to prototyping.

This is one of its intended uses.

> Whitespace is an esthetic preference that make Andrew Hunt and David
> Thomas (of Pragmatic Programmer fame) prefer Ruby.

Evidence?  And I mean evidence that whitespace is *the* reason and not
just a convenient summary of an overall esthetic preference.

In any case, so what?  Different strokes for different folks.  Do they
also use indentation for human readers?  If so, they have assigned
themselves the task of keeping brackets and indents in sync so that
human and machine 'see' the same structure.

I see two good uses for brackets:
1.  machine-generated code never intended for human eyes
2.  redundancy for transmission error detection by a processor that
compares brackets and indents and raises a flag on mismatches.

A compromise in the area of structure indication would be accepting
either brackets or indents or both.

> Yahoo groups moved from python to C due to dynamic typing.

Evidence?  Evidence as to what exactly happened (it is not common
knowledge that I know of) and that any such change was a reasoned
technical decision and not politics.

If memory serves me right, Guido has tried a couple of compromises to
slightly limit dynamicity that he could not see much use for and has
backed off at least partly when current users presented use cases that
the change would break.

> Non-compiled - obviously there are times when performance matters
more
> than other things. Google I believe uses python to prototype (or
used)
> and then turns to c++ for heavy lifting.

This is a simple matter of economic tradeoff.  A week of programmer
time costs roughly the same as, say, a year of pc time.  A roaring
success like Google has hundreds (thousands?) of servers around the
world running the same relatively stable code.  Faster code means
machines not bought, installed, and maintained.  But I imagine that
their main production code is pretty far out on the frequency-of-use
curve.

Terry J. Reedy






More information about the Python-list mailing list