[Python-3000] What's the point of annotations?
Phillip J. Eby
pje at telecommunity.com
Wed Jan 3 01:20:38 CET 2007
At 05:48 PM 1/2/2007 -0600, Collin Winter wrote:
>Is whatever savings you see there worth changing the language for? Is
>function overloading really that important and that common?
Ah, but now you're making a different argument. Your original statement
was that "we're getting along without annotations quite nicely"; my
response was merely to refute that point. There do indeed exist use cases
that are better off with annotation than without.
In addition, you're reducing my statement to only a single use case: not
only did I list two, but there are plenty of others. I felt that two use
cases were sufficient to refute the proposition that there were *no* use
cases. But there are certainly others.
For example, interfacing to at least Java and Objective C have also been
mentioned as use cases, and I can think of a variety of other uses such as
database query mapping, predicate logic functions, and web or other types
of RPC parameter marshalling.
Now, if you want to pick at each and every one of these use cases and
assert that the one use case, *by itself*, doesn't justify the feature,
well, you may be right. But as with decorators, that doesn't necessarily
mean the feature itself is wrong! Decorators are an excellent example of a
feature that meets many use cases, few if any of which would be sufficient
in themselves to justify a language change.
More information about the Python-3000
mailing list