"Model 2" prototype status
Brian Goetz
brian.goetz at oracle.com
Fri Aug 7 17:17:59 UTC 2015
> So in that case, considering the static T or Foo<T> members as belonging
> to a concrete specialization is actually intuitive, at least to me.
We've had this discussion several times before, and still no one is
buying this argument.
Coming from C# (or C++), which have different models for parametric
polymorphism, it might make sense. (Even if Java, it might have been
"intuitive" if we had heterogeneously-translated generics from day one,
but we didn't.) In Java, statics have always been shared across
instantiations (and they predate instantiations). Having them shared
across some instantiations (Foo<String> and Foo<Integer>) but not others
(Foo<Integer> and Foo<int>) would be silly and definitely not intuitive.
Changing the current behavior (making them not shared across any
instantiations) is completely off the table. (Do I even have to say
this?)
I understand what you want to express, and I agree its valuable that it
be expressible. But the path you're trying to sell is not the way to
get us there.
More information about the valhalla-dev
mailing list