RefObject and ValObject
brian.goetz at oracle.com
Mon Apr 15 20:39:43 UTC 2019
> 1) any codes that has inference
> var list = List.of(new Foo(), new Bar());
> will be inferred as List<RefObject> instead of List<Object>, so calling a method that takes a List<Object> will not compile anymore.
Not to dismiss the “what about inference” issue, but any code that combines `var` with `List,of()` should not be surprised at the result of inference ….
But, “what about inference” noted.
> 2) any code that consider Object as special class may stop working, dynamic proxies that have a special case for Object, any code that reflect recursively on the hierarchy to find all the methods, any code that remove getClass() from the getter list, etc.
Absorbing value types is going to require some changes on the part of most frameworks to get best results. This one seems in that category?
Again, not to dismiss, keep them coming, but so far this isn’t scaring me away from having the object model that makes most sense.
More information about the valhalla-spec-observers