[Compiler-sig] More jython progress.
Finn Bock
bckfnn@worldonline.dk
Fri, 24 May 2002 13:22:14 +0200
[Eric C. Newton]
>>Yeah, but you want to live without the ability to add new class instance
>>attributes?
>
> Perhaps I'm just getting hung up on definitions.
>
> I was translating "class instance attributes" as "object attributes"
> since an "instance of a class" is called an "object". Now that I
> think about it, it could mean "attributes which are stored in
> classes".
I meant it as "object attributes". We can't add new attributes to any of
the nodes in the AST tree.
I think that the correct python term isn't "object" (everything is an
object, even classes) but "class instance". I got that from:
http://www.python.org/doc/current/ref/types.html
but maybe I'm wrong.
>>If we decide that the AST node must support attributes then I can also
>>add it to jython. I can simple do a kind of deepcopy of the tree that
>>returns real class instances in place of the java instances. It will
>>just make the AST tree building from python a little slower.
>
> Slower is not better. I prefer to work in python, even if I have a
> few more rules. If it gets slower, I'll be forced to go to C.
The "little slower" I was talking about would only be for jython and I
don't think that the "little slower" speed would be much different from
the speed of the pickling phase suggested by Jeremy.
regards,
finn