Kay Schluehr wrote: > That's simply because no one knows about the effects it has on Pythons > programming practices. Hence it is outsourced to "3rd party packages" > and these can be x-compilers as well that do all the inference stuff > and translate to Pyrex, C++, D or any other language having an > appropriate bridge. This stuff is simply beyond Python 3.0 and might > be addressed in subsequent versions such as Python 3.1 or Python 3.2 > when experiences are collected with different "annotations handlers".
More interesting than optional annotations are the restrictions of ShedSkin, which forbid some changing of variable types. This allows some significant optimizations. If you accept the ShedSkin or Psyco restrictions, you get most of the performance advantages of strong typing without all the verbosity of explicit typing. PEP 3107 seems to add negative value to the language. The ability to add arbitrary attributes to parameters which can then be interpreted by some external library yet to be defined is a "l33t feature", one that's more cute than useful. Type-based dispatching is cute, but not really essential to Python. (PEAK, the main effort in that direction, seems to be defunct.) What we need are better implementations than CPython, not hokey attribute schemes bolted onto the language. We're seeing stuff go in that's easy to add to CPython, but not necessarily good for the language as a whole. John Nagle -- http://mail.python.org/mailman/listinfo/python-list