On Nov 7, 2008, at 7:56 PM, Alexandre Bergel wrote:
when we do not
merge a class and its metaclass the instance variable
of a metaclass could have
an instanceScope since it is true that the instance variable is an
instance one.
Yes
Now when we merge a class and its metaclass the
class instance
variable should have a class scope since
from the base class it is clearly a class scope variable.
humm...
class and metaclass variables will belong to one unique instance scope
I guess.
Why should the class variable be in a different scope? Especially
since a class variable begins with a capitalized letter, which is then
easy to differ from instance variables.
Because originally an instance variable has the class scope while a
classVar has a class + class class Scope
For shared this is simple they are shared and
have a classScope.
When a classes and their respective meta are merged?
when the importer asks for it.
Now from a
user point of view I would like that an analysis does not
depend on whether we
merged or not the class and metaclass.
As far as I can see, an analysis may depend on whether you merge
classes and metaclasses.
It seems hard to imagine than any analysis should be depend on whether
there is such a merging.
you mean independent?
If we have the same data represented the same way independently of
merging
we favor that an analysis code does have to have different cases based
on merging
or not?
So I will put
classScope to
instance variable of the metaclass
even when they are not merged with the base class.
This way we always get the following situation
isntance varaible -> instanceScope
class instance variable -> classScope
shared -> classScope + isShared
Let me know what you think since I will implement the following and
write tests.
ah ok. It makes sense to me.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev