Live data from Hacker News

JEP 401: Value Objects (Preview) merged to OpenJDK master

github.com

131–140 of 185 posts

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#131
post #15

I feel lonely in that: I mostly love Java as a language. The lack of value types is the biggest impediment to certain types of performance. I am really looking forward to this evolution of the language.

You shouldn't be. I do like Java a lot, and recent changes (and speed of those) just makes it more and more better.

And I appreciate and I'm under huge awe to the amount of though put into the evolution -- instead of just cramming every new shiny thing they ponder it a lot to arrive at the most sensible option while trying their best to maintain backward compatibility -- kudos!

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#132

Earlier quoted context omitted.

java the language is amazing the problem with it is entirely cultural. why is `IStatusChangeEntityCreationManagerFactory` everywhere? and why are the frameworks so huge and all encompassing? i think batteries included rails-style frameworks are great, but when i wrote Java, it didn't feel like rails at all none of these are language problems

This is specifically Spring culture, not Java culture in general. I don't tend to see this outside of Spring. Maybe back in the J2EE days, but that community seems to be more or less dead. Java is a big tent. Yeah there are some parts that deserve this kind of mockery. The Rails equivalent is over-metaprogramming. "I solved it with method_missing." I've worked on code like this in real life. TBH I'd rather have the i…

I**Factory existed long before spring came around

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#135
post #8

Earlier quoted context omitted.

Java has a mechanism for Integer and Long objects caching using something that already looks like value object, cached objects can be compared using ==. hashCode of Integer already returns int, the boxed int value. Not much of value is lost.

Of particular note, all 1-byte Integers are interned, there is a pool of small Integers from -127 127 which are reused whenever possible. I learned this the hard way, when a C++ JNI extension I was working on accidentally overwrote the pooled value for zero, and all hell broke loose...

[deleted]

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#137
post #15

I feel lonely in that: I mostly love Java as a language. The lack of value types is the biggest impediment to certain types of performance. I am really looking forward to this evolution of the language.

The tooling could be better, though.

I wish it came with more batteries included, and it renovated that old Java cli split per commands, following a bit what golang did:

- java run

- java build

- java test

- java fuzz-test

- java format

- java lock

- java lsp

- etc.

Along with a better support of posix long form flags like ‘--version’.

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#138
post #15

I feel lonely in that: I mostly love Java as a language. The lack of value types is the biggest impediment to certain types of performance. I am really looking forward to this evolution of the language.

What I love the most is the sheer amount of thought and philosophy put into Valhalla. It transcends the binary understanding of object vs value and actually defines 4 distinct buckets: 1: Classical Object 2: Object without identity 3: Atomic Value 4: Classical Value (Tearable) Each bucket has clearly defined performance characteristics and semantic constraints. So depending on the nature of your data, you can always…

It's work of art and a work of science, I'd say. Programming language dev needs both, and I think Java has learned how to do both, at least compared to its messy early years.

On the note of science, I'll credit Java's maintainers for treating their language as a technology and not merely as a product. Many languages respect the real-world physics of computers to stay relevant. Few respect the "metaphysics" until weird bugs keep emerging in the compiler and ecosystem. Bugs that can't be solved with more building, engineering, or even design. Because those bugs are not defects; they come from the concepts & axioms of the language itself, not its implementation.

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#139
post #32
post #27

Earlier quoted context omitted.

Is there a writeup on why they choose to destroy the history?

You can recover the history using their tooling build on top of their bugtracker and GitHub. Specifically they capture the discussions and all small changes over time in their skara tools and are prepared to leave GitHub if needed. They had multi de adres experience and had multiple prior code repos. Still do if i understand as the Oracle team has the sun and bea code repositories pre openjdk preserved.

Hmm. Is this about Github or Git? Dependency on Github seems tangential to treating Git as a first class record of history.

edit: rereading, I guess the implication is that there's tooling built on top of Github outside of Git, so Git history is indeed not meant to be contain some things.

Re: JEP 401: Value Objects (Preview) merged to OpenJDK master

#140
post #15

I feel lonely in that: I mostly love Java as a language. The lack of value types is the biggest impediment to certain types of performance. I am really looking forward to this evolution of the language.

The tooling could be better, though. I wish it came with more batteries included, and it renovated that old Java cli split per commands, following a bit what golang did: - java run - java build - java test - java fuzz-test - java format - java lock - java lsp - etc. Along with a better support of posix long form flags like ‘--version’.

That will not happen for backward compatibility reasons but a new build tool with a modern CLI would be nice. One that's declarative like Maven (without the XML) and doesn't require an upgrade for every new JDK version like Gradle (screw Gradle).
Post reply on HN