Value types - compatibility with existing “value objects”
Palo Marton
palo.marton at gmail.com
Thu Jan 8 09:47:39 UTC 2015
Hi. I have a question about value types:
Will it be possible (within valhalla) to rewrite java String as value type
in JDK and use it in all places in JDK where it makes sense? (eg.
Class.forName(string), Object.toString(), Integer.parseInt(string). …)
Or more general question:
There are already plenty of “value objects” in existing java code. In JDK
we have, String, File, Point2D,... Also many people have already declared
their own class Point { final x,y; } and similar objects. Once we move to
value types in java, will it be possible to rewrite these to value types
without breaking compatibility with old pre-value-types code? E.g. if I
change my Point object to value type in my library, can this new library
(jar) still be used in other projects that were written before this change?
And without need to recompile those other projects?
More information about the valhalla-dev
mailing list