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.
Java 21 makes me actually like Java again
Submitted 1 year ago by abobla@lemm.ee to programming@programming.dev
https://wscp.dev/posts/tech/java-pattern-matching/
Comments
PortugalSpaceMoon@infosec.pub 1 year ago
BatmanAoD@programming.dev 1 year ago
They allude to this later, acknowledging that it’s sort of a cross between unit and bottom.
aloso@programming.dev 1 year ago
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)
solrize@lemmy.world 1 year ago
It’s nice that Java has gotten those features but the article is pretty confused about type theory.
TheCee@programming.dev 1 year ago
It’ll probably take Valhalla for me, personally.
SpaceNoodle@lemmy.world 1 year ago
When did you start liking it?
igorlogius@lemmy.world 1 year ago
Image