[lworld] RFR: 8244231: [lworld] Add support for ref-default and val-default inline classes.
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Thu Jul 22 12:58:08 UTC 2021
On Thu, 22 Jul 2021 12:03:49 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:
> > Let me punt the question by saying - with the admission that javadoc of L_Typeof_Q was wrong and confusing, do we agree that once that is corrected, the flavors capture and model the domain information faithfully ? I don't off the top of the head recall places where this sharper distinction is needed - but if there is consensus that the model is valid even if a bit baroque, then that is reason to preserve it till we have more experience to definitively prune what we think is valid but superfluous information captured in the abstraction.
>
> While the javadoc is the main issue, the current behavior or "isReferenceProjection" and "isValueProjection" remind me of `2 + 0 + 0 != 2`, so I find it confusing.
>
> I think perhaps the name "projection" is also misleading - as now we have primitive reference type and primitive value type, and what you really want to ask a type is in which of these two bucket it falls in. Giving too much importance as to "how" a type has been derived (e.g. redundant `.val` or `.ref` ?) smells of over-specificity which will bite us back, I believe.
In the course of discussing further to understand this point, it has been evident that the javadoc of com.sun.tools.javac.code.Type#isReferenceProjection mentioning
Or in other words, is this a class type non-redundantly notated with .ref ??
(and likewise for isValueProjection())
is not helpful in one bit and has been a source of confusion. I will clean up that part. That part of the wording tries to be helpful, but backfires perhaps
-------------
PR: https://git.openjdk.java.net/valhalla/pull/482
More information about the valhalla-dev
mailing list