[Python-3000] Use cases for type annotations?
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Sat May 20 22:09:38 CEST 2006
"Steven Bethard" <steven.bethard at gmail.com> writes:
> (1) there were very few real implementations of the ideas, and
> (2) where there was an implementation, it relied on concrete types
Common Lisp has:
- Classes ("concrete types"), with explicit subclassing,
not parametrized, defined strictly, used for dispatch.
- Types, with various ad-hoc notations for builtin concepts (like
integer ranges, arrays with specialized element types, functions
with specific argument and result types), where asking for subtyping
has three possible outcomes ("yes", "no", "I don't know", with
partially implementation-dependent distribution), used mainly for
optimization based on explicit declarations, and sometimes for
expressing predicates to be tested against concrete objects.
Python seems to want to archieve both goals with one system.
I'm sceptic.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-3000
mailing list