Live data from Hacker News

Java 21 makes me like Java again

wscp.dev

621–630 of 777 posts

Re: Java 21 makes me like Java again

#621
post #616

Earlier quoted context omitted.

Gradle is steaming pile of garbage. But since the zoomers are allergic to XML, Maven (actually fast) is slowly dying.

Gradle is much faster than maven as it can properly parallelize the workloads. Sure, it won’t be visible on a hello world, though.

Has never been the case in my many years of using it. Hundreds of MB permanent RAM usage for the daemon (which it wouldn’t require if it was properly designed), everything taking well above 10s. None of this has ever been an issue with Maven.

Re: Java 21 makes me like Java again

#622

Earlier quoted context omitted.

Yes, I'm also not really sure I want to see algebraic types in Java even though I would prefer if a language that focused on algebraic types was more popular. All the existing Java code doesn't go away, so is it really going to be nicer to have code like this mixed randomly into that?

Of all the features most Java devs (and ex-Java devs) desire, algebraic types are near the bottom. How about intersection and union types? (NO, sealed classes are not a substitute for unions). But, yeah, in my view JDK 21 is a a disappointment. I rarely want pattern matching, but I would like properties please and records are nice, but actual tuples are more useful. Etc.

[dead]

Re: Java 21 makes me like Java again

#623
post #151

Earlier quoted context omitted.

>Only if you're using vim like someone from the 70s, otherwise any sane IDE handles those things for you I don't think that's quite it when Ruby is also from the 90s and figured out not to tie namespace resolution to the directory tree

I am not sure why this is a problem. Looking at the organization of the resources directory of every project I've ever worked on, I am not sure I want more opportunity for physical and logical concepts to unnecessarily diverge.

I mean, its the same idea as custom path config in TypeScript

Re: Java 21 makes me like Java again

#625
post #611

Earlier quoted context omitted.

Java GUI is less appealing though

but it would still be bettter and more performant than electron based apps. a little memory heavy, but no more than electron apps while being less janky

For me I use neither, I actually picked wxWidgets after all those desktop GUI troubles over the years, not ideal, but it's the best I found for myself.

Re: Java 21 makes me like Java again

#626

Earlier quoted context omitted.

whose license model is a mess unless your GUI is totally open source.

Isn't it just LGPL? Why is that a "mess"?

I'm not a lawyer, I wish it's as simple as "it's just LGPL", it's not.

Otherwise Qt has already conquered the desktop GUI world, it did not for a reason: the license mess.

Re: Java 21 makes me like Java again

#627

The title of the blog post is IMO a poor choice. The (hidden) subtitle of the post is "Algebraic data types in Java" which is much more descriptive of the content. A better title would have been "Algebraic data types in Java 21". Perhaps because of the title, many/most of the comments here are off-topic. I was hoping to see more discussion about algebraic data types, strengths and weaknesses of the Java implementatio…

I did title it that way at first but ended up changing it at the last second, ended up shunting it off course.

It's a great post. Thank you for writing it!

Re: Java 21 makes me like Java again

#628

any advice on a book/tut to learn "modern" java?

Manning's Modern Java in Action is outstanding. It assumes you already know basic Java. https://www.manning.com/books/modern-java-in-action

both suggestions here are for books that cover java 8. how is it possible that java 8 is modern relative to java 21?

Re: Java 21 makes me like Java again

#629

Earlier quoted context omitted.

Manning's Modern Java in Action is outstanding. It assumes you already know basic Java. https://www.manning.com/books/modern-java-in-action

both suggestions here are for books that cover java 8. how is it possible that java 8 is modern relative to java 21?

Core Java for the Impatient (3rd) is less than a year old and updated for Java 17.

Re: Java 21 makes me like Java again

#630

The title of the blog post is IMO a poor choice. The (hidden) subtitle of the post is "Algebraic data types in Java" which is much more descriptive of the content. A better title would have been "Algebraic data types in Java 21". Perhaps because of the title, many/most of the comments here are off-topic. I was hoping to see more discussion about algebraic data types, strengths and weaknesses of the Java implementatio…

Yes, I'm also not really sure I want to see algebraic types in Java even though I would prefer if a language that focused on algebraic types was more popular. All the existing Java code doesn't go away, so is it really going to be nicer to have code like this mixed randomly into that?

Well hopefully it won't be mixed in _randomly_.

I have some use cases in mind and think it will be very helpful. I have been converting a 10+ year-old code base to modern, functional-style Java and believe that sealed types and pattern matching will help us further simplify our code and eliminate more usages of nullable values.

A challenge for us will be that we need the core library to stay on JDK 8 for a while. But, in general, I am finding that you can implement a JDK 8 library that works well with newer JDKs if you are careful (and willing to write more verbose code using the older syntax/libraries to support the newer paradigms)

Post reply on HN