Review Request: Add ClassOption.STRONG and default is unspecified
Alex Buckley
alex.buckley at oracle.com
Wed Mar 11 23:13:34 UTC 2020
On 3/11/2020 3:34 PM, David Holmes wrote:
> I think this is making things unnecessarily awkward. The suggestion from
> yesterday (as per below) was to change the default to be weak, and allow
> people to ask for strong.
My suggestion had another component too: to specify that the default is
unspecified. That means that the default could be weak in HotSpot 15 and
strong in HotSpot 17 and weak in HotSpot 23. Weak is a sensible default
for implementations, but if a developer can't guarantee it when they
want it, then they'll be mad with us.
> If it is insisted that we have both WEAK and STRONG then we can achieve
> having the default unspecified by requiring that one of them always be
> passed in. But I much prefer what was suggested previously: either
> default is strong and you can ask for weak; or default is weak and you
> can ask for strong.
I was actually careful not to say anything about the WEAK enum constant.
I wanted to focus on a bigger story and deal with enum constants later
(and here we are). Mandy's compendium of use cases suggests that some
libraries want strong and some libraries want weak and some don't care
-- with that in mind, I fall into the "default unspecified; allow X or Y
to be chosen" camp, rather than the "default specified as X; allow Y to
be chosen" camp. I believe the lumping-versus-splitting philosophy can
guide us, but I didn't take a guru-level course in it yet, so John's
guidance is welcome.
Alex
More information about the valhalla-dev
mailing list