28 points

permalink
report
reply
10 points

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.

permalink
report
reply
4 points

They allude to this later, acknowledging that it’s sort of a cross between unit and bottom.

permalink
report
parent
reply
4 points

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)

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
7 points

It’s nice that Java has gotten those features but the article is pretty confused about type theory.

permalink
report
reply
5 points

It’ll probably take Valhalla for me, personally.

permalink
report
reply
2 points

When did you start liking it?

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.5K

    Monthly active users

  • 1.7K

    Posts

  • 28K

    Comments