Static fields and specialization

Brian Goetz brian.goetz at
Mon Jan 12 15:32:40 UTC 2015

> Yes, but you can not create specialized implementations for user defined
> value types.

Where do you get this idea, that value types and specialization don't 
play together?

Also, note that allocation for value types doesn't allocate.  So your 
mental performance model about what "new Optional<int>()" costs is 
probably just wrong.

More information about the valhalla-dev mailing list