Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

201–210 of 362 posts

Re: The decline and fall of Java on the desktop

#201
post #153

Earlier quoted context omitted.

The exception doesn’t prove the rule. It’s ridiculous that I have to modify Java VM arguments so IntelliJ can use more ram and actually index my projects. The IDE is great, but Java undoubtedly makes it worse.

That’s the fault of jetbrains, not java. They release it with way too old JRE with custom patches and quite shitty default arguments, while it works eons better with no argument at all on an up-to-date jdk, but even more so with the single setting of a low-latency GC, ZGC. The JVM is a beast, why do you think a good deal of all serious web applications run on top of it?

> The JVM is a beast, why do you think a good deal of all serious web applications run on top of it?

The JVM sacrifices latency for throughput, which is good for servers but not for desktops.

Re: The decline and fall of Java on the desktop

#203

Not just Java, there's been a decline of desktop apps in general. It's kind of ironic, because most of our apps are now running in an even slower language with "Java" in the name (JavaScript)

I find this such a shame. I think this reflects an increasingly consumer versus producer aspect of culture. I find that desktop apps support and foster creativity, and producing readily manipulable creative artifacts - with speed. Sass/webapps/etc tend to foster consumer-oriented, indeed mobile, usage, creation and creative operations are often subtly high-latency and subsequently & so are tacitly discouraged while consumption is encouraged.

I love the pitch found in https://www.inkandswitch.com/local-first/, but it doesn't seem like it's resonated much in the large - so far, at least.

Re: The decline and fall of Java on the desktop

#204

Earlier quoted context omitted.

That's not the fault of the language, though I'd say maybe Kotlin is a considerably better choice nowadays. If by blockly you mean the visual interface, what you said is going to be true for any language. If by blockly you mean javascript, maybe, but honestly if it's an exercise to build foundations (and not just for personal gratification), javascript (or python) isn't much easier for kids than Java, because it has…

> And if there's any fault in the language chosen for AP computer science, the blame should go to the designer of the curriculum. Java was recommended for AP CS 22 years ago. At this point I lay less fault at their feet and I'm more interested in why it's still there at long last. > If by blockly you mean the visual interface, what you said is going to be true for any language. My research isn't published yet but I'v…

Well said! Java is the exact opposite of sane defaults: the programmer must explicitly choose defaults at every turn.

Furthermore, it constantly feels like the arcane minutiae required in Java is Java-specific, in a way that other languages (C-based, functional) aren't.

In Java, if I memorize an incantation, most of the information I've just learned is Java-specific.

In C or C++, it's more computing specific. Other languages will use different syntax, but I will be doing the same thing.

But I guess that's one of the weaknesses of reimplementing a computer in the JVM, and then writing a high-performance language to target that abstracted machine.

Re: The decline and fall of Java on the desktop

#205
post #58

Earlier quoted context omitted.

The JRE security horrorshow might have started before the Oracle aquisition, and we wanted rid of java on the desktop for the same reason we wanted rid of flash. Apple used to advertise that only Windows suffered from viruses until their own unpatched JRE was exploited widely. Oracle contributed by making updates burdensome to download, and now unavailable without a support agreement, but what stopped java GUI apps f…

I think you might be onto something. MS' C#, which is a near 1:1 copy of Java and what it aims to accomplish, has never suffered the same issues as Java's JRE. You have to wonder if that's because MS gets away with baking CLR updates quietly into Windows whereas JRE updates are more difficult to deploy.

The incentives were always misaligned for a third party framework like Java, even from someone as big as Sun, and now Oracle.

Java was never going to be able to keep up a reasonable native UI binding, because OS vendors were at best ambivalent and at worst actively hostile, because there was nothing in making it work that benefited them.

Security without centralized platform control (e.g. Windows Update, AppStore, Play) was likewise an excercise in futility.

Re: The decline and fall of Java on the desktop

#206

Successfully using JavaFX (or OpenJFX as it is now called) in a mission-critical cross-platform app with 50k+ installs. It’s not that bad really. Package size and RAM usage is a bit of an issue, as we bundle it with a jlink’ed (stripped down to what is needed, thanks to Java 9 modules) JDK. Other options like Electron or native Windows/macOS wrappers around a shared core written in C++ were discussed but ultimately d…

Java apps can't be notarized for MacOS according to the developer agreement.

Re: The decline and fall of Java on the desktop

#208

Earlier quoted context omitted.

Lombok is indeed a band-aid that replaces IDE-autogenerated code, which in turn is a band-aid for language design choices on the one hand (e.g. equals and hashcode), and accepted Best Practices in Java world like setters/getters everywhere; for the latter, you can either do public final fields, just use public fields until you need an accessor method (java's refactorings are great), or on the other hand add language…

Scala definitely has its irritations but I’ve grown to accept it. It has enough cool features to justify its existence. I’ve not used kotlin but people I respect say it’s great, maybe that’s better than Scala.

I like Scala a lot more than I feel like I should. It’s weird to say that it’s a language that feels too academic while also being heavily used by enterprises. I used it a lot while working at BigCo and there were a lot of times that the language got in the way of getting things done due to the design. But it is really elegant once you understand it. It’s no Lisp, of course, but it feels somehow both pragmatic and academic in getting things done. And for writing Spark, it’s quite expressive.

Re: The decline and fall of Java on the desktop

#209
post #38

Earlier quoted context omitted.

I had to use OpenJFX for school recently, and while I still hate the Java language, I had to begrudgingly admit that JavaFX really wasn't that bad at all. It more or less did what I wanted it to do, the resulting GUI didn't look too bad, and it performed well enough. I ended up using it for a Clojure app a bit later. It's good enough to where I think that if JavaFX had come out around the same time as Swing, the Java…

I hate the old school way of writing Java more than any other language. I love writing in "modern" Java more than any other language. Lombok, RxJava/Reactor where possible, and monads everywhere. It is beautiful and succinct, though I totally appreciate it may not always be easy to introduce on older frameworks or legacy projects.

Can you link an example of a codebase written in this modern-Java style? I've seen parts of it here and there, but I don't think I've ever seen all this used together.

Re: The decline and fall of Java on the desktop

#210
post #93

Earlier quoted context omitted.

Haven't used Lombox, RxJava is great, but it just feel like bandaids on a language that wasn't really designed for it. There's no accounting for taste, but I'll take either Scala or Clojure on the JVM any day of the week. Scala's monads don't feel like a library feature, they feel baked into the language...because they are.

Lombok is indeed a band-aid that replaces IDE-autogenerated code, which in turn is a band-aid for language design choices on the one hand (e.g. equals and hashcode), and accepted Best Practices in Java world like setters/getters everywhere; for the latter, you can either do public final fields, just use public fields until you need an accessor method (java's refactorings are great), or on the other hand add language…

> That said, I did hear Java is getting value types soon, or something like that.

Java has had records (the thing that's like Lombok) since Java 14.

What Java is soon getting is inline value types, i.e. datatypes that work like primitives (are pass-by-value; have no identity but rather structural equality; are freely copyable; can be held on the stack, or intrusively within a containing array; etc.)

Post reply on HN