Draft JVMS changes for Nestmates

John Rose john.r.rose at oracle.com
Thu Apr 20 00:16:44 UTC 2017

On Apr 18, 2017, at 11:40 PM, David Holmes <david.holmes at oracle.com> wrote:
> I have not yet seen a follow up from John as to whether we require or just allow, an empty NestMembers attribute to indicate a singleton nest member.

I think we should neither require nor allow an empty NestMembers attribute.

Dan may prefer to minimize syntax checking, in which case an empty
NestMembers attribute would be allowed.

Nobody has proposed a reason to require it.  A nest of one member is
(depending on your POV) either the overwhelmingly common trivial case,
or a useless degree of freedom.  Taking the POV (from Brian and me)
hat every class has a nest (just as every class has a package), an
empty NestMembers attribute is just a waste of bits stating the obvious,
about a stand-alone class.

(I'd prefer to disallow the empty NMs attribute, lest it accidentally acquire
some additional meaning.  But as long as we specify that an empty one
conveys the same condition as no attributes at all, we are safe from accident.)

— John

More information about the valhalla-spec-observers mailing list