It’s nice that Java has gotten those features but the article is pretty confused about type theory.
I’m not sure I agree that Void is a bottom type. If so, void-functions would never be able to return/terminate. Java’s void is probably more of a unit type.
They allude to this later, acknowledging that it’s sort of a cross between unit and bottom.
No it’s not, it is 100% a unit type (except it’s not really a type, since you can only use it as return type and nowhere else)
It’s not possible to instantiate or assign, which is more like a never type than a unit; and it is not possible to define new types with the same properties, which is also more like bottom than unit. But you’re right that it’s not actually a true never type since it can’t represent function divergence.
I think the truth is just that Java’s type system isn’t very mathematically disciplined.
It’ll probably take Valhalla for me, personally.
When did you start liking it?