News for hackers. Stuff that matters.
Re:Java Is in Decline, and There's Data to Prove It by traceroute66 on Sunday January 01, 2023 @08:51AM (#34206224)
My view is that Java was a product of its time. Absolutely fabulous for the 90's and 00's, no question whatsoever about that. But today you would be nuts to use Java instead of Go (or Rust if you need the low-level).

Go has a solid stdlib. Go can cross-compile and provide single-binary distribution.

Go doesn't have and client-side JVM dependency nonsense. Literally just ship the compiled Go binary for your app, everything is "batteries included" for the user. Doesn't matter if you're writing a simple CLI tool or a server.

I even don't write shell scripts any more, I write in Go and ship the binaries. It's cleaner and more robust to code and it's easier to deploy because of zero dependencies.

Re:Java Is in Decline, and There's Data to Prove It by lp4vn on Sunday January 01, 2023 @09:15AM (#34206389)
>But today you would be nuts to use Java instead of Go (or Rust if you need the low-level).

I really hope you're trolling to come up with this kind of statement.

Re:Java Is in Decline, and There's Data to Prove It by matsemann on Sunday January 01, 2023 @09:13AM (#34206376)
There is no client side jvm dependency anymore. You bundle the jvm as part of your executable, using jlink to only include what's needed. It's invisible to a consumer that it's a java program. No need to install JRE.

Seems like your knowledge about Java is ~10 versions old.

Re:Java Is in Decline, and There's Data to Prove It by traceroute66 on Sunday January 01, 2023 @09:19AM (#34206422)
> There is no client side jvm dependency anymore. You bundle the jvm as part of your executable

So there is still a JVM dependency then, you're just hiding it.

How does that JVM bundling work out for bloat ? I'm guessing it increases the size of the package, and the JVM still has a tendency to eat RAM for breakfast like it always did ?

Does JVM still need "tuning" for production via obscure flags and XML file params ?

Re:Java Is in Decline, and There's Data to Prove It by matsemann on Sunday January 01, 2023 @09:31AM (#34206518)
Your argument was that go was "batteries included for the user", and I pointed out that's now true for java as well. Now you're moving the goal post.

I don't really care about a few mb extra size of bundling. Maybe some use cases do. I haven't tweaked jvm params in years. For a dockerized cloud deploy it's fire and forget.

If we're talking about bloat, the current python app I'm working on needs ~20x as many nodes as a similar jvm project I worked on earlier..

Re:Java Is in Decline, and There's Data to Prove It by fulafel on Sunday January 01, 2023 @09:24AM (#34206458)
Go also embeds a copy of the runtime in the executable and has a reputation for big executable size.
Re:Java Is in Decline, and There's Data to Prove It by erik_seaberg on Sunday January 01, 2023 @09:51AM (#34206674)
Tuning the JVM is no fun, but tuning by repeatedly rewriting your own code is a lot more effort and risk.

As for package size, there are people who bundle a stripped down JVM with a single app, but I don’t think that’s a good use of time—I’d much rather declare a dependency on the complete OpenJDK, and rely on the system package manager to install exactly one copy of it for all apps to use.

Re:Java Is in Decline, and There's Data to Prove It by willnonya on Sunday January 01, 2023 @09:52AM (#34206680)
I am not familiar with GO but it seems a fallacy to believe that any language not already integrated with the OS wouldn't have some dependency that has to be installed or included in the distrusted files for them to work.

Your other comments seem to fall into the mindset of those that think that being able to control or configure your environment is somehow bad because it requires you to know something about that environment.

Re:Java Is in Decline, and There's Data to Prove It by philliphaydon on Sunday January 01, 2023 @09:03AM (#34206304)
> Literally just ship the compiled Go binary for your app, everything is "batteries included" for the user. Doesn't matter if you're writing a simple CLI tool or a server.

> It's cleaner and more robust to code and it's easier to deploy because of zero dependencies.

If you want clean and simple then C# does all this and is clean and simpler.

Re:Java Is in Decline, and There's Data to Prove It by spicyusername on Sunday January 01, 2023 @09:07AM (#34206336)
The biggest thing about C# (and it's .NET peers) that turns me off is the link to Windows and Microsoft.

I don't like using Windows or Visual Studio for development.

Re:Java Is in Decline, and There's Data to Prove It by kcartlidge on Sunday January 01, 2023 @09:28AM (#34206491)
> I don't like using Windows or Visual Studio for development

You don't need Windows or Visual Studio (though Visual Studio [ie not VSCode] is actually pretty good with the native Mac edition).

I do a lot of C# (alongside mainly Go and Node) and the quality of the experience on a Mac is easily on a par, plus the language is much nicer in many areas than its peers (eg needing more than Go's maps and slices). It is Windows-first on the developer tooling, for historical reasons, but far from Windows-only these days.

Re:Java Is in Decline, and There's Data to Prove It by christophilus on Sunday January 01, 2023 @09:28AM (#34206485)
For me, it’s the language complexity. For 15 years, I was nearly exclusively a C# developer. Since I moved on, it seems it’s gotten quite a bit of syntactic complexity.

I also dislike the way you have to manage a sln file— which doesn’t work as well as Go & other more recent languages with my preference for simple editors.

I also didn’t like the enterprisey culture that seemed to nearly always surround C# (this was maybe 10+ years ago, so this may have changed).

All that said, C# + Visual Studio was a remarkably productive combo.

Re:Java Is in Decline, and There's Data to Prove It by kcartlidge on Sunday January 01, 2023 @09:35AM (#34206544)
> For me, it’s the language complexity.

I sometimes get the feeling I'm falling a little behind on the language features. Fortunately they aren't required, and the basics of C# (especially with Linq and generics) are so good that the newer features are benefits to discover as and when needed.

Definitely agree with the solution files. Core is a little better in that at least in the project files there's no longer the repo churn as individual source files don't need to be explicitly listed. I quite like Go's modules, and especially prefer how you can redirect a Go module reference to point directly to a local version when you're working on it, rather than adding a local publish folder as a Nuget source in C#. Little things that add up.

Re:Java Is in Decline, and There's Data to Prove It by arcturus17 on Sunday January 01, 2023 @09:42AM (#34206596)
> For me, it’s the language complexity. For 15 years, I was nearly exclusively a C# developer. Since I moved on, it seems it’s gotten quite a bit of syntactic complexity.

From the outside looking in - I don't know C# yet but I want to learn it in 2023, and I've been perusing docs and books - the language and ecosystem doesn't look much more complex than anything else I've worked with.

It seems to have many features, but that's precisely one of the things that I'm looking for, personally.

> All that said, C# + Visual Studio was a remarkably productive combo

Most C# and .NET devs repeat this (though VS is replaceable with Rider), and honestly I'm too tired to care about much else so that's what I find appealing about it. I just can't bear the decision fatigue of JS (or even Python) any longer.

Re:Java Is in Decline, and There's Data to Prove It by GiorgioG on Sunday January 01, 2023 @09:10AM (#34206356)
You can use Linux or Mac to develop C#/.NET apps with VSCode, JetBrains Rider, or even vim: https://github.com/OmniSharp/omnisharp-vim
Re:Java Is in Decline, and There's Data to Prove It by philliphaydon on Sunday January 01, 2023 @09:09AM (#34206348)
I do most my .NET development on Linux… you don’t need windows or visual studio for like 6 years now.

Edit: changed all to most as I still need windows for some c++ specific stuff at the moment.

Re:Java Is in Decline, and There's Data to Prove It by arcturus17 on Sunday January 01, 2023 @09:24AM (#34206457)
> Edit: changed all to most as I still need windows for some c++ specific stuff at the moment.

What kind of stuff? I am going to invest heavily in learning C# and .NET in 2023. Anything that takes me out of Unix development and hosting would be a huge no for me. I get the impression you might be doing things at the edges that I might not ever encounter so you are not going to dissuade me, but I'm curious nonetheless.

Re:Java Is in Decline, and There's Data to Prove It by philliphaydon on Sunday January 01, 2023 @09:43AM (#34206603)
Haven't found a way to build a C++ DLL on Linux that can be registered in Windows. So I keep my laptop dual boot to do Windows specific stuff. In terms of C# that's entirelly on Fedora right now.
Re:Java Is in Decline, and There's Data to Prove It by nephanth on Sunday January 01, 2023 @08:27PM (#34213147)
Um last time I got interested in it you still needed mono for runtime the same way java needs a jvm. Is that not the case anymore ?
Re:Java Is in Decline, and There's Data to Prove It by philliphaydon on Sunday January 01, 2023 @08:56PM (#34213330)
You don’t need mono anymore as .NET 5 onwards (.NET Core previously) is cross platform.

For deployments you can build self-contained which includes the bits required to run.

So for example I’m building a little browser game in my spare time. It’s a web app and a service. So 2 components. They are deployed to (ubuntu server cos I’m waiting for Amazon linux 202# to release) which does not have the .NET runtime installed. It’s used the built in kestrel server to accept web requests. So no nginx or Apache or anything. Tho I would prob add nginx if the server was public facing but since everything goes via a load balancer I don’t bother.

Re:Java Is in Decline, and There's Data to Prove It by Vt71fcAqt7 on Sunday January 01, 2023 @08:57AM (#34206263)
What about being cross platform? There is something to be said about having a bytecode that makes switching to a new architecture easier.
Re:Java Is in Decline, and There's Data to Prove It by AndyPa32 on Sunday January 01, 2023 @08:54AM (#34206246)
Java is a bit late to the party, but native binaries are possible for a few years now.
Re:Java Is in Decline, and There's Data to Prove It by pulse7 on Sunday January 01, 2023 @09:17AM (#34206403)
With Excelsior JET [1] you could do that since 2000. They closed the company when GraalVM/Native Image started coming out...

[1]: https://en.wikipedia.org/wiki/Excelsior_JET

Re:Java Is in Decline, and There's Data to Prove It by pasza on Sunday January 01, 2023 @09:40AM (#34206576)
They were far ahead of the GraalVM - especially with the Swing based GUI applications. The license costed a fortune though...
Re:Java Is in Decline, and There's Data to Prove It by wernerb on Sunday January 01, 2023 @08:54AM (#34206245)
As long as there are no cheap go programmers to find you will see java being very relevant.
Re:Java Is in Decline, and There's Data to Prove It by Nursie on Sunday January 01, 2023 @08:56AM (#34206259)
It wasn't exactly fabulous back then - 'Enterprise' java was a quagmire of mediocrity in the 00s.

I quite like it now in some ways, its packaging system allows for comparatively rapid development, you can find libraries for a lot of stuff, and it is quite an expressive language. In other ways it's in a sad state - the reflexive use by most projects of quite heavy frameworks that purport to do a lot of work for you and then fail at various edge cases while adding multiple layers of opaque magic and tons of transitive dependencies... it's less than brilliant. And startup times are an issue.

Go is nice too. It has some shortcomings in the breadth of its ecosystem, but I'm sure that will grow with time.

Re:Java Is in Decline, and There's Data to Prove It by traceroute66 on Sunday January 01, 2023 @09:08AM (#34206346)
> 'Enterprise' java was a quagmire of mediocrity in the 00s.

Yes, I agree.

But at the time, fighting with Tomcat stack traces was often still preferable to a number of other options at the time.

Its obviously been a while, but IIRC for web stuff if you were not a JAR shop, then you were (probably) using ColdFusion or PHP, because the Microsoft badge couldn't be trusted at the time to be put on the web. And back then PHP was v4/v5 where it deservedly gathered community hate unlike today's pretty decent v7/v8. ColdFusion was generally ok though, but I think its largely going the way of Java these days, overtaken by better tech.