Typing system vs. Java

Christopher Barber cbarber at curl.com
Wed Aug 1 21:32:01 CEST 2001


"Alex Martelli" <aleaxit at yahoo.com> writes:

> "Christopher Barber" <cbarber at curl.com> wrote in message
> news:pso66c9rpo8.fsf at jekyll.curl.com...
> > Well, I actually used Python on a number of projects a couple of years ago
> and
> > did spend more time than I would have liked writing tests to detect type
> > consistency.
> 
> Probably no more time than I spend cursing [expletive deleted]'s who
> write type-tests. ... 
> "BEHAVES-LIKE-A" (i.e. IS_ADAPTABLE_TO_PROTOCOL) is what, at most,
> one SHOULD be testing (if anything).

Sure, but it is often much easier to document that var x must be a foo than it
is to say that it must provide some arbitrary set of attributes.  This after
all is one of the point of types: to create a shorthand for sets of properties
that you want to go together.

- Christopher



More information about the Python-list mailing list