Zope 3.0, and why I won't use it

Ville Vainio ville at spammers.com
Tue Nov 16 19:14:54 CET 2004

>>>>> "Ian" == Ian Bicking <ianb at colorstudy.com> writes:

    Ian> I would think of it differently.  I don't see a need for
    Ian> static typing to deal with the outside world.  There's always
    Ian> a bridge when communicating with the outside world, and if
    Ian> that bridge is smart enough it should be okay.  You can

With things like IronPython, there isn't necessarily any "outside
world". The compiler can look at the code, determine that it's "typed
enough" and compile it to a more static form of code that can be
JIT-compiled to native code.

    Ian> it would be worth it for any external interface, but for
    Ian> internal interfaces it might be worth it, where there's less
    Ian> of a concern about flexibility.  In that case, decorators
    Ian> might be all that's necessary, e.g.:

    Ian> @constrain_types(a=float, b=str, c=int:
    Ian> def foo(a, b):
    Ian> c = 1
    Ian> ...

Guido has stated that we shouldn't jump all over decorator syntax for
function/method signatures, because type declarations will appear in
language syntax at some point. We'll see how that pans out - in the
meantime, perhaps having some kind of "standard" type declaration
(-ish) decorator in the standard library would be conductive to having
One Obvious Way of telling IDEs about the types.

Ville Vainio   http://tinyurl.com/2prnb

More information about the Python-list mailing list