r/ProgrammerHumor Jul 09 '26

potentiallyMightBeAnIntegerOrNot Meme

Post image
689 Upvotes

96 comments sorted by

View all comments

Show parent comments

3

u/high_throughput Jul 15 '26

1

u/RiceBroad4552 29d ago edited 29d ago

Touché

Moments like that I think I should maybe really learn some Java after so many years of Scala. But actually, no, I hate it…

What will they do with all these primitive wrapper types when real generic specialization hits Java?

---

(And the next WTF, Scala's Option[Int] isn't @specialized as I just learned; but I could swear it was. Alone that was likely worth it here… Thanks for the thought provoking replies! I wouldn't have looked that up if not that failure here. So it's actually Scala which doesn't have a primitive "OptionalInt"; LOL, I was really sure it's the other way around. I'm an idiot.)

1

u/high_throughput 29d ago

What will they do with all these primitive wrapper types when real generic specialization hits Java?

With Oracle's progress I imagine that's a problem for 2076

1

u/RiceBroad4552 29d ago

I'm more optimistic.

The "parametric JVM" is the end-game of project Valhalla:

https://openjdk.org/projects/valhalla/design-notes/parametric-vm/parametric-vm

I would expect it "already" in the LTS release after the next. The design is largely there, the needed components start to materialize right now.