Static fields and specialization

Ben Lewis benlewisj at
Sat Jan 10 22:08:46 UTC 2015

Static fields cannot be specialized as what type would the field be
Optional, Optional<int> or Optional<someValueType>. This approach has
problems with generics anyways, both Optional.empty() and
Collections.empty*() are methods to maintain type safety as stated in the

On Sun, Jan 11, 2015 at 10:34 AM, Palo Marton <palo.marton at> wrote:

> If static fields are not specialized, how will you handle things
> like Optional.EMPTY?

More information about the valhalla-dev mailing list