[Python-Dev] nightmare: PEP 252, PEP 253 and jython issues
Guido van Rossum
guido@python.org
Fri, 24 Aug 2001 14:44:05 -0400
[snip]
[SP]
> *bad-guy-java*
> > > > > Yes ... very slow and we would have to use that also at the very
> > > > > core of the hierarchy, see (*) but the problem is more
> > > > > complicated, in Java given three classes
> > > > >
> > > > > C extends B extends A
> > > > > and a method m
> > > > > C.m overrides B.m overrides A.m
> > > > >
> > > > > there is not direct way (even using reflection)
> > > > > to apply B.m behaviour to a C object, unless
> > > > > the programmer has left some hook in C using super
> > > > > or in B ( a method B_m e.g.).
>
[snip]
> I overlooked a central point, namely *bad-guy-java*
>
> I fear, because of it, we have to code all the built-in types this way,
>
>
> class SpamType {
>
> ... SpamTypes__foo__ { ...
> }
>
> ... __foo__ { }
>
> }
>
> Or find other slower ways, otherwise no descrs for them
As long as the slowness only applies when someone invokes
SpamType.__foo__(x), that's acceptable.
--Guido van Rossum (home page: http://www.python.org/~guido/)