Typing system vs. Java

Andy Freeman anamax at earthlink.net
Sun Aug 5 01:29:53 EDT 2001


Courageous <jkraska1 at san.rr.com> wrote in message news:<vblomtomuhmk79gk4u64504njgaj4af0dp at 4ax.com>...
> >Would you use it often enough to warrant a language change?
> 
> Personally, probably not. I'm really only observing that many of
> the requests for "type safe containers" that you see around are
> really on a desire to have uniform containers. It's easy enough
> to create these by hand if your really want them.

What does "uniform" mean?

Is [1, 2.7] uniform or not?
How about [1, 0]?

Note that the first is "uniform" with respect to addition, but
not with respect to being used as an argument to slice (I think)
while the second is uniform wrt slice, but not as the second
argument of division.

And, how about subclasses?

As Martelli points out, types are too strong, too weak, and have
strange costs in the wrong places.  The right question is whether
the relevant operations are defined and have the right semantics,
and types don't help much with it.

-andy



More information about the Python-list mailing list