"Model 2" prototype status
Brian Goetz
brian.goetz at oracle.com
Fri Aug 7 16:37:37 UTC 2015
I don't see that there's any other sensible choice. Asking users to
reason about the partially-heterogeneous translation (where some
instantiations share a class and some do not) in the context of an
existing language feature like static fields would be silly -- and
counterproductive.
(There are other places where the translation will necessarily intrude;
ideally, we want to keep those to reflective features, those that cut
across the language-level type system and the runtime class system, such
as class literals (Foo.class), instanceof, casting, and reflection.)
> I think keeping static fields per-class (in the sense of "the class the user
> wrote down in code", not "some random class artefact the runtime happened to
> emit") would be the most sensible and simple thing to do. No explanation or
> learning necessary, because everything works exactly like it has the last 15
> years in Java.
More information about the valhalla-dev
mailing list