News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by synergy20 on Saturday September 16, 2023 @11:16PM (#37541176)
Go's major selling point to me is that you can ship one binary, nothing beats that.

Python, Node, Java all have to pre-install lots of dependencies before you can use them, fine for developers, not so great if you want to distribute software for people who are not software savvy, who typically just wants to download one file, install and start using it.

c and c++ can also do one executable, but, it is not as portable as Golang, and not as static-link friendly as Golang.

Re:Java 21 makes me like Java again by chii on Saturday September 16, 2023 @11:41PM (#37541294)
> not so great if you want to distribute software for people who are not software savvy, who typically just wants to download one file, install and start using it.

i think it's a flaw that wasn't considered properly in the standard java toolchain to not produce an embedded java runtime into a final packaged artifact that is self-executable.

You end up with third party tooling like: https://www.ej-technologies.com/resources/install4j/help/doc... (and https://launch4j.sourceforge.net/ too).

If oracle bundled this tool into the JDK, it would've not been an issue at all.

Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @03:36AM (#37542475)
It has existed for 20 years, and already started with Sun.

Having AOT compilers as commercial offerings, was seen as one way to capture value in the Java market, in a culture where most compilers were still commercial, GCC being the exception.

Re:Java 21 makes me like Java again by coldtea on Sunday September 17, 2023 @09:35AM (#37544918)
>It has existed for 20 years, and already started with Sun.

In an anemic way, with mostly third party offerings few people know or care about, and various degrees of pain and shortcoming to their use. It should be a first class feature, and as simple to use as is in Go (including for cross compiling).

In general, if something exists in "some form" for 30+ years in a language, and only a handful of people use it, whereas in another it's used all the time and people from other languages are jealous of how well it works, then the formers "some form" is not a good one.

Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:35AM (#37552964)
Regardless, it exists.
Re:Java 21 makes me like Java again by javcasas on Sunday September 17, 2023 @03:54AM (#37542586)
That wasn't a flaw. It was a "feature". Can yo you think of a way to increase market awareness of Java other than putting an icon on every computer in the world saying "Your Java needs to be updated" every two weeks?
Re:Java 21 makes me like Java again by nvm0n2 on Sunday September 17, 2023 @05:53AM (#37543264)
There is jpackage and jlink, which don't do single files but make single directory apps.

These days there's also GraalVM native image which does produce Go-like results. But with everyone using Docker on the server anyway it doesn't matter anymore. People who talk about single binaries are confusing to me. What are you doing where shipping one file is so much simpler than shipping a container?

Re:Java 21 makes me like Java again by chii on Sunday September 17, 2023 @06:17AM (#37543442)
> What are you doing where shipping one file is so much simpler than shipping a container?

Desktop applications.

Java would be a more popular desktop application platform if it weren't for the difficulty in this area (which, to be fair, isn't the only difficulty - cross platform is difficult inherently).

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @09:44AM (#37544995)
it's pretty hard for average Joe to install a docker engine before he can pull and run dockers, plus docker is not that great for cross platform desktop GUIs.
Re:Java 21 makes me like Java again by otabdeveloper4 on Sunday September 17, 2023 @11:26AM (#37546048)
> everyone using Docker

Not really.

Re:Java 21 makes me like Java again by vips7L on Sunday September 17, 2023 @02:09PM (#37547809)
jpackage and jlink are shipped in the jdk.
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."
Re:Java 21 makes me like Java again by cbm-vic-20 on Saturday September 16, 2023 @11:46PM (#37541328)
Since Java 9, developers can use jlink to provide a pre-packaged runtime environment bundled with the application. It's not static-link friendly or a single executable, but it does not require the user to pre-install anything or pull dependencies at runtime.
Re:Java 21 makes me like Java again by paradite on Saturday September 16, 2023 @11:47PM (#37541334)
You mentioned "distribute software" but did not consider Electron for Node.

You can make an Electron app with JavaScript and ship the binary (or installer) on any platform. It's not a single executable file, but the user experience is the same.

I don't think there's an equivalent in Go that allows you build a desktop app like that (with frontend and backend both written in Go)?

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @12:26AM (#37541518)
electronjs is probably the best cross platform desktops GUI,just a bit heavy.I actually use wxwidgets for GUI desktop apps.
Re:Java 21 makes me like Java again by troupo on Sunday September 17, 2023 @12:56AM (#37541647)
The best cross platform desktop GUI is Qt.
Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @09:45AM (#37545010)
whose license model is a mess unless your GUI is totally open source.
Re:Java 21 makes me like Java again by wtetzner on Sunday September 17, 2023 @10:03AM (#37545181)
Isn't it just LGPL? Why is that a "mess"?
Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @12:05PM (#37546533)
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 by troupo on Sunday September 17, 2023 @02:06PM (#37547777)
It did conquer (-ish) the desktop GUI world, for a while: quite a lot of software was written in it.

And then Electron happened.

Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @10:30AM (#37570491)
> And then Electron happened.

Which is worse for users, but better for developer productivity (probably nicer for developers too: C++ is not exactly fun).

I am still hoping that JVM Desktop apps come back at some point, maybe with Kotlin Multiplatform?

Re:Java 21 makes me like Java again by caskstrength on Sunday September 17, 2023 @02:20AM (#37542066)
> You mentioned "distribute software" but did not consider Electron for Node.

Sorry for the snark, but users will undoubtedly be very grateful to them for not considering Electron.

Re:Java 21 makes me like Java again by paradite on Sunday September 17, 2023 @05:54AM (#37543278)
I'm not so sure if the users of VS Code, Discord, Slack, etc would agree.

Yes it's bulky and sometimes slow, but it offers a lot of features and allow developers to ship features and updates really fast, while only needing one codebase for all platform.

Re:Java 21 makes me like Java again by coldtea on Sunday September 17, 2023 @09:43AM (#37544991)
I'm a user of VS Code and Slack and I'd be very happy if they didn't use Electron.

>Yes it's bulky and sometimes slow, but it offers a lot of features and allow developers to ship features and updates really fast, while only needing one codebase for all platform.

Like Slack having 1000x the memory and CPU use for 1/10th of the features a 200K app like ICQ used to have 25 years ago?

Re:Java 21 makes me like Java again by forty on Sunday September 17, 2023 @12:24PM (#37546744)
I feel vscode is quite good at hiding the fact it's not native, and felt quite snappy when I used it. Slack on the other hand feels painful slow and heavy (and very sensitive to network events like change of network or short disconnections, while native apps are generally much better add handling such glitches for some reasons)
Re:Java 21 makes me like Java again by nirvdrum on Sunday September 17, 2023 @09:50AM (#37545053)
I can't see users caring about it all being one single codebase and I don't think that they should. Every cross-platform development tool like this means awkward, non-native UIs. Maybe there's something to new feature development. But, I suspect the big players could be a little less profitable and deliver a better experience for their end users.

I've used Electron as a developer, too. While it may have been fast & easy at one time, I think that argument is losing merit. Electron had a lot of security holes and patching them has made common tasks harder. Security with Electron is a problem in general given its massive surface area.

Users definitely notice the performance issues. It's certainly not just devs complaining about abstract issues. Yes, people use these tools, but that's mostly out of necessity, not preference. Moreover, big players like VS Code have had to write swathes of the app in C++ for performance reasons.

I look forward to a return to optimizing for the user, not developer velocity. There will likely always be attempts at cross-platform toolkits and there may be a good solution in that space. I hope Electron isn't the best we can do.

Re:Java 21 makes me like Java again by paradite on Monday September 18, 2023 @12:39AM (#37552300)
> Security with Electron is a problem in general given its massive surface area.

I'm new to Electron development. I've read the docs recommending hardened runtime. Would it be sufficient for security? Can you give examples of such security issues?

Re:Java 21 makes me like Java again by nirvdrum on Thursday September 21, 2023 @03:45PM (#37603156)
Here I was referring specifically to pulling in a web browser as a dependency. Chrome pumps out security releases regularly for all sorts of issues. If you're essentially making Chromium the core of your application, you inherit those security issues (setting aside the fact it may happen in code paths you don't use). And, consequently, you need to keep up on updating Electron and distributing new builds to your end users, even if you haven't made any code changes.

I'm not suggesting every Electron app is a giant bag of vulnerabilities, just that you have a lot more to keep on than you would writing with GTK or UIKit. And, since everything is bundled with the application, you can't rely on OS updates to fix things for you. You need to cut a new release and distribute it.

If you follow the Electron recommendations on security you'll be on the right path. You'll just find common tasks have become harder than they were back when Electron was attracting people with its ease-of-use. I found trying to do type-safe IPC to be an exercise in frustration. If you read the old docs, tutorials, or books, you'll find IPC used to be considerably more free-wheeling. Locking it down is the right trade-off, I think. But there's been an accumulation of many small changes like that. As a result, I don't think the framework is nearly as easy to work with as when Slack or VS Code adopted it.

Re:Java 21 makes me like Java again by paradite on Friday September 22, 2023 @10:52AM (#37612833)
Thank you for your response. I have previously dealt with IPC for a different project and it was painful indeed.

But I found out that there is this new Preload module in electron that lets you use Node.js very easily via normal export and import. I'm using a popular starter template and it works great so far.

Re:Java 21 makes me like Java again by neuromanser on Sunday September 17, 2023 @01:33PM (#37547475)
Using Discord for voice comms in CSGO on Ryzen 3600x w/ 32GB RAM had noticeable impact on my framerate, big enough that I refused to use for this purpose. No impact using Teamspeak. Both in Windows.
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @10:27AM (#37570444)
Haven't used VScode, but Slack absolutely sucks IMO (on Linux). I don't even want to install Discord, I use it from the website (but I'm pretty sure the Electron app would be similar to the Slack one).

> Yes it's bulky and sometimes slow, but it offers a lot of features and allow developers to ship features and updates really fast, while only needing one codebase for all platform.

So you are saying that it is bad for the user (bulky and slow), but good for the developer productivity. I really don't see how the users could like the fact that the developers are being more productive while making a worse app.

Re:Java 21 makes me like Java again by mike_hearn on Sunday September 17, 2023 @05:56AM (#37543288)
You can do that with Java too. The JDK has jpackage, but if you want something better than I'm willing to sell that to you (or give it for free, if you're open source):

https://conveyor.hydraulic.dev/

It can be used to ship servers, we use it that way for our own servers. It sets up systemd so you don't need to use Docker. But where it shines is desktop apps.

Windows users get a little 400kb EXE that installs/updates your app and then immediately starts it without user interaction required, so it's effectively a single EXE. Mac users get a bundle. Linux, well, Linux users get a deb that sets up the app+its apt repo, or a tarball. Maybe in future a FlatPak or Snap or something else.

It knows how to bundle and minimize a JDK along with your app as part of the release process. Works great for desktop apps.

It's for Electron too, same deal, easier than Forge in my humble and very biased opinion.

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @10:33AM (#37545439)
Java GUI is less appealing though
Re:Java 21 makes me like Java again by dzonga on Sunday September 17, 2023 @11:20AM (#37545973)
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

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @12:04PM (#37546517)
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 by mike_hearn on Sunday September 17, 2023 @12:43PM (#37546975)
That was true in 2005. Modern Java UI can look pretty great. Two examples:

1. Start IntelliJ and check it out. It's Swing but it feels modern and fresh.

2. Go to https://www.jfx-central.com/ ... JavaFX was introduced years ago to add far better support for modern visuals. JFX Central is a website written with JavaFX itself - it runs server side and streams drawing instructions to the client (implemented using a mix of divs, svg tags and css). You can do this because JavaFX implements the CSS2 drawing model. The website looks modern, like any slick website would today, but you can also download and run it locally. It uses Conveyor to do that in fact. The desktop version looks exactly the same as the web version.

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @03:38PM (#37548595)
how is jfx-central different from https://openjfx.io?
Re:Java 21 makes me like Java again by mike_hearn on Monday September 18, 2023 @04:47AM (#37553763)
Different websites run by different people, I think. The former is more of a news site.

But yeah, arguably they should be unified.

Re:Java 21 makes me like Java again by mathiasgredal on Sunday September 17, 2023 @12:46AM (#37541608)
You just add the -static argument, if you want a fully static executable that can run on any linux distro: ‘g++ -o main main.cpp -static’

You can even go above and beyond with cosmopolitan libc v2, which makes c/c++ build-once run-anywhere: https://github.com/jart/cosmopolitan/releases/tag/2.0

There seems to be some work getting cosmopolitan libc support in Go, but it is not ready like it is for c/c++: https://github.com/golang/go/issues/51900

Edit: There can be some problems with using static, if you are using your system package manager for library dependencies. I would recommend compiling dependencies from source using CMake and FetchContent, this has solved pretty much all problems I have had with c++ dependency management.

Re:Java 21 makes me like Java again by palata on Sunday September 17, 2023 @01:20AM (#37541768)
How do you distribute a Go library? How do you distribute a Go library that has dependencies?
Re:Java 21 makes me like Java again by mariusor on Sunday September 17, 2023 @02:21AM (#37542070)
I'm not sure if your question is rhetorical, but Go doesn't have the concept of compiled library that you can link to another binary.

So in Go you make available the library's source code, and the end-user will download it at build time, or vendor it in the source tree.

Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @03:39AM (#37542488)
Which is a non starter for businesses that don't ship source code.
Re:Java 21 makes me like Java again by lakomen on Sunday September 17, 2023 @08:55AM (#37544559)
Re:Java 21 makes me like Java again by mdaniel on Sunday September 17, 2023 @12:48PM (#37547026)
> Plugins are currently supported only on Linux, FreeBSD, and macOS, making them unsuitable for applications intended to be portable.

uh-huh

but, in all seriousness: I wonder why that is? I struggle to think of a technical reason that go would be unable to load and invoke a .dll even if one had to name it .so https://github.com/golang/go/blob/go1.21.1/src/plugin/plugin...

Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:35AM (#37552954)
Not only it doesn't work in all platforms, it uses a bare bones C API with unsafe code, and it hasn't been removed yet due to backwards compatibility, as Russ Cox already expressed his opinion that plugin was a mistake from his point of view.
Re:Java 21 makes me like Java again by ncruces on Sunday September 17, 2023 @11:16AM (#37545934)
Businesses that want to sell libraries without a source code license can ship APIs.
Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:29AM (#37552925)
Sure, if they don't care about performance.
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @01:21AM (#37565872)
Not sure I understand what you mean here. How do I ship the API of my library without shipping the library?
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @01:22AM (#37565882)
Right, so it feels like Go hasn't solved this problem. It just completely ignores it.
Re:Java 21 makes me like Java again by ozim on Sunday September 17, 2023 @01:24AM (#37541798)
If you want to distribute app to non tech people you do it via browser ;)
Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @12:44PM (#37546979)
there are many apps that are not suited for a browser :(, on some embedded devices with a touch screen, it does not even have a browser and no internet connection either.
Re:Java 21 makes me like Java again by ozim on Sunday September 17, 2023 @01:21PM (#37547351)
From my POV that is bad example, for those embedded apps you have technical personnel installing and configuring those. Non-technical users don't have any means to install/modify whatever is there.
Re:Java 21 makes me like Java again by sangnoir on Sunday September 17, 2023 @02:40AM (#37542164)
> Go's major selling point to me is that you can ship one binary, nothing beats that.

Are .war files no longer a thing? ;)

Re:Java 21 makes me like Java again by invalidname on Sunday September 17, 2023 @02:52AM (#37542213)
I suggest reading about GraalVM...
Re:Java 21 makes me like Java again by lenkite on Sunday September 17, 2023 @02:59AM (#37542265)
> Go's major selling point to me is that you can ship one binary, nothing beats that.

You can ship one compiled binary in Java too if you want it. https://www.graalvm.org/22.0/reference-manual/native-image/

> Go is simple. It's easy to understand, read, and maintain

Go involves a lot of code repetition which makes it difficult to human-scan and maintain. Worked on both large scale Go and Java projects and I found Java projects easier and more comfortable to maintain. Had to pay a lot more attention to Go. Go is easier to write though thanks to its well-designed and extensive standard library which is possibly the best in the world, but the maintenance angle still tilts to Java. There are also more Gotchas in Go compared to Java.

Re:Java 21 makes me like Java again by reacharavindh on Sunday September 17, 2023 @08:37AM (#37544420)
I’m neither a Golang nor a Java developer per se, but I touch source from both as an SRE. I find it weird to see so many comments saying Go is verbose and Java is not. I found the opposite to be true. To do every little thing, the Java code has a ton of abstraction, and the actual implementation of anything is so far removed from the place where it is used that it gives me such a headache to touch anything without wondering “whatever else would break if I change this behavior?!”

However, the Go code bases I’ve encountered have been less abstract and to the point(even if it means repetition of some little things). I also found it to be free of boilerplate except for the if err != nil part.

I guess those that have spent decades in such abstractions must have learnt a skill to navigate such a spaghetti. But, I still hate it every time.

Re:Java 21 makes me like Java again by lenkite on Monday September 18, 2023 @08:26AM (#37555214)
Quite a bit depends on how the codebase has been written and what era are you looking. Before Java 8/9 or after it. Java code written in the recent era is pretty lean and mean.

No matter the amount of abstraction though, one rarely runs into the sort of issues in Java that Go code tend to run into frequently - causing multi-million dollar mistakes frequently even for experienced Go programmers. For loop semantics https://bugzilla.mozilla.org/show_bug.cgi?id=1619047, Unintended variable shadowing, common mistakes in slice appends/copies, slices and memory leaks, defers inside loops, nil interface vs nil, panics in go-routines. There are loads of bugs in OSS projects wrt to these usually repeated again and again.

Go is very simple to learn and very hard to master writing bug-free code. Looking forward to seeing how languages like Rust perform if/when adopted by enterprise.

Re:Java 21 makes me like Java again by vips7L on Sunday September 17, 2023 @02:05PM (#37547764)
> You can ship one compiled binary in Java

Even if you’re shipping a jar. You can ship one artifact by using jlink or you ship the runtime in the docker image.

This has been a solved issue for ages.

Re:Java 21 makes me like Java again by saiya-jin on Sunday September 17, 2023 @08:37AM (#37544418)
You can easily pack every single class file and resource into one single .jar if you desire to do so, no external dependency apart from JRE itself. Oh and of course no installation necessary, just put it anywhere with read access, all works.

At least in the past you could also make a single .exe out of it via 3rd party if you wanted, but I didnt use that for 20+ years so maybe its not valid anymore.

Re:Java 21 makes me like Java again by mdhb on Sunday September 17, 2023 @08:42AM (#37544450)
I never see Dart talked about in these contexts but just to highlight a few things.

1. Compiles to native code with a single and very reasonable sized binary on pretty much any platform.

2. Compile to WASM (coming this year) if that’s your thing.

3. Excellent concurrency support with lightweight and simple mental models

4. Variables are not nullable by default thus simplifying tedious checking in your codebase.

5. Syntactically it’s the best parts of Java and JavaScript combined without all the foot guns and verbosity.

6. Full support for both OOP and functional code styles

7. Existing interop support with C, C++, Rust, Java and JavaScript and in the future WASI.

8. Fully static / compile time metaprogramming capabilities coming this year.

9. Also have maybe one of the best teams working on it that I’ve ever seen in an open source project anywhere. They put in a stupid amount of detail and care to try and keep everything pointing in the right direction at a macro level and have really strong levels of transparency around how the language is developed https://github.com/dart-lang/language

Honestly I think it’s critically under-rated and under-used. Most of its common criticisms I see about it are many years out of date.

Re:Java 21 makes me like Java again by synergy20 on Sunday September 17, 2023 @09:41AM (#37544977)
you still need wrap in Dart's runtime though, just like Rust, it's possible to pull in the libraries, it's just not static-link "friendly".
Re:Java 21 makes me like Java again by lakomen on Sunday September 17, 2023 @08:51AM (#37544513)
Performance matters. Dart isn't even in the same league.

And its null handling and checking is the worst.

I absolutely hate it. Java over Dart any day.

Re:Java 21 makes me like Java again by sgt on Sunday September 17, 2023 @09:19AM (#37544781)
Dart has excellent null handling[0] so I am not sure if you're perhaps talking of another language? It has had this since release 3.0, if I recall, and has been out for quite a while.

https://dart.dev/null-safety

Re:Java 21 makes me like Java again by mdhb on Sunday September 17, 2023 @09:12AM (#37544715)
What specifically about the null checking are you talking about?

I’ve never heard this criticism before and have no idea what you’re even referring to here but I am genuinely curious..

Re:Java 21 makes me like Java again by tsss on Sunday September 17, 2023 @02:26PM (#37547954)
Combining the best parts of Java and JavaScript isn't exactly something to boast about. Dart lives and dies with the Flutter framework. Other than that it's not doing anything special. Not terrible but also not a significant improvement.
Re:Java 21 makes me like Java again by mdhb on Monday September 18, 2023 @02:36AM (#37552966)
I mean you’ve taken my point, cut it in half to remove the relevant context and are now arguing against a point you’ve made up as some kind of gotcha… I don’t know what you want me to say to that.

Same with your second point. I made a big point to explicitly say I think that right now Dart is very underused and has a huge potential outside of Flutter. Quoting that back to me as though it was something I hadn’t considered is equally as confusing.

Re:Java 21 makes me like Java again by ihateolives on Monday September 18, 2023 @08:27AM (#37555216)
I'm with you, I think that Dart is very sensible and very underappreciated language. But he does have a point in saying that currently Dart is tied to Flutter. Google is presenting Dart as a language that you write Flutter with, not as a separate entity. I'd much prefer if Google would present Flutter as a GUI framework for Dart, but alas. Perception is everything. As much as I'd love to start my next project in Dart I probably won't because I can't be sure that Dart won't end up in Google's graveyard in next couple of years whereas I'm pretty sure that Go won't.
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @10:19AM (#37570334)
I support that. I tried Flutter a few years ago, and I liked Dart and the Flutter way of defining the UI (compared to the old xml stuff in Android).

Then I moved to Kotlin + Jetpack Compose, and I don't see the point of Dart anymore.

Re:Java 21 makes me like Java again by tsss on Tuesday September 19, 2023 @07:03AM (#37568202)
You say Dart is underused, but why build something new with Dart when you could do the same thing with a better language? The only reason to use it is Flutter.
Re:Java 21 makes me like Java again by simon_void on Tuesday September 19, 2023 @09:40AM (#37569802)
Familiarity comes to mind. Dart has developed into a nice direction with sound null-safety, extension functions, sealed classes and compilation to native&wasm. (The libaries weren't very mature when I used Dart, not sure if that changed.) I'd pick Kotlin because I'm familiar with it, but if mdhb is familar with Dart, maybe from his work with flutter, maybe from a time where you'd mostly use Dart to compile it to js, then go for it. Dart is a nice enough language to earn my thumbs up. (not that that would be important to anyone.)
Re:Java 21 makes me like Java again by vips7L on Sunday September 17, 2023 @02:08PM (#37547793)
Shipping one binary to install on a users machine has been solved by jlink and jpackage for ages.