Draft JVMS changes for Nestmates

Dan Smith daniel.smith at oracle.com
Wed Apr 19 16:47:44 UTC 2017


> On Apr 19, 2017, at 8:12 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> 
>> Yep. Also, multiple classes can claim the same nest member class in their NestMembers attributes. Not a problem as long as the MemberOfNest attribute (if any) of the member class points to a host class that claims it.
> 
> 
> At the risk of bikeshedding, I find the names NestMembers and MemberOfNest confusing; I keep having to think about the directionality, since they sound so similar.  Would be good to find names that have obviously opposite directionality.  
> 
> A not-very-good suggestion (but which illustrates the directionality thing I'm going for) would be "NestDeclaration" and "NestUse".  It's pretty clear which is which without thinking about it.
> 
> Perhaps: NestHost and NestMember ?

I also don't love that "NestMembers" seems more authoritative than it really is. (Doesn't get validated, doesn't suggest that other classes can be dynamically added.)

Something like "AllowedInNest" would better convey the actual meaning of that attribute.

—Dan


More information about the valhalla-spec-observers mailing list