Earlier quoted context omitted.
I used to love Java mostly for its batteries-included well designed standard library. Despite the verbosity of the language itself. But over time the language has really evolved a lot and gotten a lot more pleasing to the eye (in my opinion).
At some point I thought there was no way back compared to C#. But nowadays I see the language improved a lot, avoided async/await and added virtual threads, added records, now Valhalla, decent lambdas and tons of quality of life improvements. In the meantime C# became a monster of 2000 ways to declare properties init get, set, backed, not backed, stackalloc, structs, etc. And I know it is done for performance: but Ja…
JEP 401: Value Objects (Preview) merged to OpenJDK master
151–160 of 185 posts
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#152Earlier quoted context omitted.
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
#153Earlier 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…
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#154Earlier quoted context omitted.
I**Factory existed long before spring came around
I-prefixing interfaces is a practice from Microsoft's COM, and to this day still isn't part of Java culture, despite the efforts of subversive dotnet renegades.
Manager // interface
ManagerImpl // classRe: JEP 401: Value Objects (Preview) merged to OpenJDK master
#155I 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.
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#156Really cool, shame that strings can’t be fully indistinguishable like Integer despite their immutability
We have tons of wrapper classes in our codebase which seem ideal as value objects. For example, instead of passing around "String emailAddress", we have a wrapper class EmailAddress. While we can now make our EmailAddress class a value object, we cannot do "==". Unlike ZoneId in which there's a fixed set and you can intern all ZoneIds in the string pool, email addresses are unique and trying to intern all email addresses would be a bad idea. So it seems like using .equals is here to stay even for these types of basic classes.
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#157Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#158Earlier quoted context omitted.
this comment reads like a parent who can’t help but love their child unconditionally and uncritically. That’s a lot of complexity a lot of other languages don’t even need. It’s great Java designers have managed to shoe horn something in, but it’s all because of misdesigns 30ish years ago mispredicting of computer architecture.
Your comment makes no sense to me, but I must grant that there is a lot of bad reporting about Valhalla and I’ve been following the mailing lists for well over 7 years now. Nothing, absolutely nothing about the design is a compromise that would detract from the project if it was for any other language. You could judge them for bringing “complexity to an easy topic” but it really is far from that and the idea of a val…
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#159Earlier quoted context omitted.
It depends on how you look at it. C++ is very different since it is native. Java is a VM. This affects lots of decisions in weird ways. But in essence both commit to backwards stability at the end. C++ goes for performance, JVM for a more full-featured bytecode vm, etc. but still.
The JVM goes for performance, too, only with an emphasis on the performance of larger programs. It's designed to address some of the serious performance issues that large C++ programs tend to suffer from (I originally made the switch to Java because it was getting hard to keep the large C++ applications we were working on fast enough; Java does some optimisations that are hard for a C++ compiler).
I meant the kind of "perf-to-the-instruction" thst native can generate vs other considerations.
Re: JEP 401: Value Objects (Preview) merged to OpenJDK master
#160Earlier quoted context omitted.
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).
Maven 4 provides alternative build file syntax with extensions: https://github.com/maveniverse/mason