On Mon, Jun 25, 2012 at 1:09 PM, Kent Sølvsten <[email protected]> wrote:
> I really likeYour idea of constraining mutability in the builder phase to the 
> value 'in focus' - at least from a framework kind of view.
> Not sure if it would make usage harder API-wise, though. But it could be a 
> start allowing better performance with slightly less functionality.

The more I think about it, the more I like it. We have never assumed
that one can created nested Value hierarchies from a single
ValueBuilder anyway, such as

ValueBuilder<X> vb = module.newValueBuilder( X.class );
X prototype = vb.prototype();
prototype.home().get().address().get().street().set("Henan Rd 555");

should simply not work. I think it doesn't. If it does, then I think
we simply remove the 'cloning' and require applications to rebuild
manually.


There is still a big gaping hole in the Immutability, which is more
important to fix; We don't "Immute" mutable classes, such as
java.util.Date, Lists, Maps and so on. Need to worry about that.



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

Reply via email to