News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by ashishb on Saturday September 16, 2023 @11:37PM (#37541271)
Fully compiled languages have another huge advantage. If you write a tool in Python and targeted say Python 3.10 then people using Phython 3.9 might not be able to use it. So, you really can't use latest and greatest features of Python 3.11 or 3.12. However, with Go, you can build your tool in Go 1.21 or whatever, and the user does not even need a Go toolchain on their machine.

I was planning to write a small side-project to generate GitHub Actions boilerplate. And this time, I intentionally chose Go for that exact reason. https://github.com/ashishb/gabo

Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @03:38AM (#37542481)
Unless dynamic linking is used, or OS APIs change between version, or specific OS files change location.
Re:Java 21 makes me like Java again by pkolaczk on Sunday September 17, 2023 @04:39AM (#37542853)
Go binaries are traditionally statically compiled.
Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @04:50AM (#37542920)
Hence my 2nd and 3rd points.

Also DNS uses dynamic linking unless configured otherwise, while being OS specific, then that are the libraries that rely on cgo.

Re:Java 21 makes me like Java again by ashishb on Sunday September 17, 2023 @05:27AM (#37543132)
Yeah, you can list 100 such cases.

Let me tell you the most common scenario. I have a fairly popular FOSS CLI tool written in Python. I cannot use the features from the latest version of Python or else I will alienate ~50% of the userbase. This problem does not exist with Rust or Go.

This problem would have existed for Java on Android except Google took the burden of "desugaring" the Java 17 code -> Java 8 compatible bytecode for the old devices.

Re:Java 21 makes me like Java again by kaba0 on Sunday September 17, 2023 @05:48AM (#37543242)
Google dug their own grave here, Java is as backwards and forward compatible as it gets.
Re:Java 21 makes me like Java again by lern_too_spel on Monday September 18, 2023 @12:12PM (#37558206)
You cannot run Java 17 code on a Java 8 runtime without "desugaring."