[Types-sig] A type checking system in Python
Ka-Ping Yee
ping@lfw.org
Wed, 21 Mar 2001 05:06:18 -0800 (PST)
On Wed, 21 Mar 2001, Clark C. Evans wrote:
> This was a very insightful post on the main list.
>
> ---------- Forwarded message ----------
> Date: Wed, 21 Mar 2001 09:15:50 GMT
> From: Huaiyu Zhu <hzhu@mars.localdomain>
>
> Type checking system in Python
>
> Classes implement a hierarchy of inheritance of attributes (variables and
> methods). They are useful for implementation modularization.
>
> There is another type of modularization that is similar in nature, but is
> independent of classes. This is the hierarchy of polymorphic interfaces.
Indeed. I think it's worthwhile for anyone who's seriously thinking
about these issues to have a look at Sather's type system:
http://www.icsi.berkeley.edu/~sather/
In particular, see:
http://www.icsi.berkeley.edu/~sather/Documentation/LanguageDescription/contents.html
(sections 4 and 5)
Sather separates subtyping (= substitutability) from implementation
sharing. It also permits supertyping, i.e. declaring something to
be a supertype of another.
(As a side note, Sather has iterators and uses the keyword "yield".)
-- ?!ng
Happiness comes more from loving than being loved; and often when our
affection seems wounded it is is only our vanity bleeding. To love, and
to be hurt often, and to love again--this is the brave and happy life.
-- J. E. Buchrose