Anonymous value class ?

Brian Goetz brian.goetz at
Wed Jul 11 17:37:52 UTC 2018

Seems a possibility.   Let’s put this on the list, but right now we’re focusing on getting to a usable minimal implementation so we can gather usability and performance feedback.   Language work to follow!  

> On Jul 11, 2018, at 11:57 AM, Remi Forax <forax at> wrote:
> While testing how value types can be used, i had to find workarounds around the fact that there is no way to create an anonymous value class using the compiler.
> If we follow the idea of having a classical constructor being transformed to a factory method, i think we should also allow anonymous value class.
>  new __ByValue Object() {
>   ...
>  };
> a synthetic factory $make$ being generated instead of a synthetic constructor. 
> Rémi

More information about the valhalla-spec-observers mailing list