polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Drop Prototype in ValueBuilder in 3.0??
Date Fri, 05 Jun 2015 06:48:28 GMT
The more I dig in the prototype support, the more I think it was a bad idea
in general.

I am leaning towards dropping the prototype() concept in Value building in
3.0 and operate on a protoInstance instead, just like is done in Entities.

Reason; The current implementation is really slow, because serialization
occurs. And that is even if I don't care about prototyping at all.

Alternatively, keep prototyping as is, but introduce a newValueBuilder()
with

The semantics are unclear, since we don't block the immutability of
property values. if we did that, stop supporting mutable types, and
wrapping Collections.unmodifiableXyz(), because then a shallow clone of the
prototype would be enough, instead of the current deep clone that occurs.

ANybody has any thoughts on this?

Cheers
-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message