On Sat, Feb 25, 2012 at 7:36 PM, Paul Merlin <[email protected]> wrote:
> I did not dig deep into the code before writing this so some of my questions
> may be just wrong, however I hope they can help us going forward.
Yes, you are bringing up interesting questions, and most of them I
have no clear answers, and possibly it requires deeper analysis and
thought.
> Will your "hybrid model" refactoring do that @Mixins declarations on
> auto-added ValueComposite to values not declaring it as a superclass are not
> ignored anymore ? Still, the mainType has a special meaning.
Yes, not ignored, because that is what started this at all, that we
allow any interface to be declared as for instance a value and the
runtime adds the ValueComposite type, but the PropertyMixin is
ignored.
I am inclined to lean towards that no types are special at all, and
instead the set of types to be the "composite type", and with that....
> Is the question about the difference between "serialize(mainType)" and
> "serialize(otherType)"
... this interesting question come up. How is serialization handled?
What happens to state, if types changes from one boot to another?
> With actual implementation, what is the serialization behavior regarding
> otherType when doing "serialize(mainType)"? Are Properties of otherType mixed
> in mainType Properties? Is this what we're talking about if we get mainType
> and otherType to be treated equal?
So, as I said, if we remove "mainType" we need to think deeper than
these questions. I even imagine;
module
.value()
.ofTypes( OneType.class, AnotherTypeClass )
.withMixins( SomeMixin.class )
> What functional changes other than serialization would be brought up by
> making mainType and otherType treated equal?
There are parts in the internals that does checks for if the
registered type (mainType) is a interface or a class. Not sure exactly
what it is for, possibly the "mixins for objects", or possibly only
private Mixins of classes....
But thanks a lot for the questions.
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev