species static prototype

Brian Goetz brian.goetz at oracle.com
Wed Jun 1 18:56:28 UTC 2016

On 6/1/2016 2:52 PM, Bjorn B Vardal wrote:
> Will the users be able to write their own <sclinit>?
>   * class Foo {
>       o __species {
>           + ...
>         }
>     }
I would assume so; even if we don't support a __species { } block, the 
user can still contribute to the species initialization with field 

     __species int x = 3;

So I see no reason to not adopt symmetry with static here.

>  Your access bridge solution using species methods looks fine, but are 
> we not solving that with nest mates?

We now have two credible solutions.  Before we had species-static, 
nestmates were basically a forced move; now its an optional move.

> I'm also wondering whether the following are typos, or if I 
> misunderstood them:
>   * TestResolution.m_I() was not meant to be decorated with '__species'
>   * TestForwardRef2.s1_S and TestForwardRef2.s2_SS don't have the
>     correct modifiers, or should not be error cases.
>   * TestTypeVar<X>.m_I() was not meant to be decorated with '__species'

I'll let Maurizio answer these.

More information about the valhalla-spec-observers mailing list