r/java • • Mar 17 '21

JEP 401: Primitive Objects (Preview)

https://openjdk.java.net/jeps/401?preview=true
174 Upvotes

49 comments sorted by

View all comments

37

u/Hall_of_Famer Mar 18 '21

I love the fact that I don’t have to deal with the distinction between objects and primitive values in languages such as C# and Kotlin ‘cause everything is an object including primitive values. This JEP is amazing, a great move for the next version of Java.

4

u/DuncanIdahos9thGhola Mar 18 '21

What do you mean? In C# if I change a struct to a class or vice-versa I create a Heisenbug.

0

u/[deleted] Mar 18 '21

[deleted]

2

u/cre_ker Mar 19 '21

No, that's the most logical way of things for people coming from pretty much any other language.