Python from Wise Guy's Viewpoint

Lulu of the Lotus-Eaters mertz at gnosis.cx
Sat Oct 25 15:08:11 EDT 2003


Adrian Hey <ahey at NoSpicedHam.iee.org> wrote previously:
|2- Development of static type systems (and type inferencers/checkers)
|   which are strong enough to offer cast iron *guarantees* but at the
|   same time are flexible enough to allow useful programs involves
|   some tricky theory that few really understand (I won't pretend I do).
|   But some language developers don't want to get to bogged down with
|   all that difficult and boring theory stuff for however many months

There's more to it than that.  For example, not many Python programmers
understand C3 method resolution order, and why it was adopted in 2.3
over the earlier algorithms.  And probably only about three Python
programmers understand some of the regex optimizations added to the SRE
engine.  And only ONE person in the universe fully understands the magic
hacks that the Timbot introduced into the latest sorting algorithms :-).

But understanding those theoretical issues makes hardly any difference
to regular programmers.  Python does a good job of hiding what you don't
need to know from you (but letting you get at it if you really need to).

With a pure, lazy functional language like Haskell, there is much less
you can JUST DO without understanding a lot of theory first.  And even
then, you need to program in functional styles, and use these weird IO
monads when you want to interface with the outside world.  For your
average Joe (or Jane), having at least the option to freely play with
mutable values, and imperative flow, makes programming a WHOLE LOT
easier to reason about.  It may well be that for rockets, nuclear
reactors, and pace makers, type safety is more important than easy
conceptualization--but for a lot of things, a low conceptual burden is
far more important than theoretical, provable correctness.

The bottom line IMO is that languages which can implement a strong and
static type system carry with them a lot of concomitant baggage.  You
pretty much need to be purely functional and side-effect free to do it
right.  Maybe OCaml walks the line between the sides, but still without
being as easy to use as Python, Ruby, TCL, even Perl--or maybe than
Lisp, with a nod to its enthusiasts.

Yours, Lulu...

--
---[ to our friends at TLAs (spread the word) ]--------------------------
Echelon North Korea Nazi cracking spy smuggle Columbia fissionable Stego
White Water strategic Clinton Delta Force militia TEMPEST Libya Mossad
---[ Postmodern Enterprises <mertz at gnosis.cx> ]--------------------------






More information about the Python-list mailing list