The feasibility of unifying the void as type

Glavo zjx001202 at gmail.com
Tue May 18 10:22:09 UTC 2021


I know that up to now, the void is not a type in JLS, but it also has many
similar features.

In Valhalla, it seems that the void can be implemented as a special
primitive class, so that it will be more useful in generic code (e.g.
`Task<void>`, `Function<T, void>`), and it is easier to be optimized by the
compiler than the current `java.lang.Void`.

I want to know the feasibility of this idea and the problems it may bring,
because this proposal seems very attractive.



More information about the valhalla-dev mailing list