Python from Wise Guy's Viewpoint

Donn Cave donn at drizzle.com
Sat Oct 25 01:03:08 EDT 2003


Quoth Adrian Hey <ahey at NoSpicedHam.iee.org>:
| ketil+news at ii.uib.no wrote:
|> While Mr. Martin probably should get out more, I must admit that I
|> have a nagging feeling about typing and object orientation.  Somebody
|> else correlated typing with imperativity, and I suspect dynamic typing
|> is a better match for OO than static typing.  But I'm probably making
|> the common error of comparing with the rather pedestrian type systems
|> of C++ and Java, perhaps O'Haskell and OCaml have systems that work
|> better?
|
| I have a my own pet theories to explain the current exitement about
| dynamically typed languages. Here they are..
|
| 1- Most of this buzz comes from OO folk, many of whom will only have
|    (bad) experience of static typing from C/C++/Java.

That is true for sure with at least some of them.

While your other two theories were interesting, I think most of
it is essentially psychological.  I am quite sure that some people
react to static typing with a deep personal resentment.  Static
typing is discipline.  It would be interesting to see how it flies
in different cultural contexts, say US vs. Japan.

But the value in not blaming it all on C++ et al. is that it gives
us some reasons to think about whether Haskell et al. are really
doing all they can to make static typing work for everyone.  Like,

   ERROR "hello.hs":8 - Unresolved top-level overloading
   *** Binding             : main
   *** Outstanding context : Show b 

Not to get into the details here, but is someone who takes our
hint here and checks out Haskell really headed for a terrific
demonstration of how modern static typing is an easy and fun way
to increase programming productivity?  It really is at least a
little harder than we would like to understand type errors like
this, let's admit.  A significant factor in the success of languages
like Python is that their shallow learning curve allows the typical
beginner (someone who has used another language) to write a useful
program after literally a few minutes of study of the language.
People like that, they don't like frustration.  Psychological thing,
as I said, but possibly something that FPLs could work on.

As for O'Haskell and Objective CAML ... I find O'Haskell really
interesting, but in my view it isn't particularly about OOP
programming in any conventional sense.  Objective CAML is, but
someone else will have to tell us how well it works as an OOPL.

	Donn Cave, donn at drizzle.com




More information about the Python-list mailing list