Hacker News new | ask | show | jobs
by jimmaswell 1241 days ago
I do wish it would all get replaced by C#/.NET. With no exaggeration, it's better in every conceivable way. Java has no reason to exist beyond inertia when C# can replace it.
5 comments

Except you're locked into a more confined ecosystem. It's smooth as long as you're on the happy path dictated by Microsoft.

At least Java is open, alternative implementations are present, and can be run on anywhere and everywhere.

> Except you're locked into a more confined ecosystem.

The Microsoft ecosystem can become more confining if you continue to operate as if its 2008 and follow all their old patterns (e.g. IIS, Azure, et. al.)

For the more clever developer in 2023, you take .NET 7 and skip over all of the Azure-integrated bullshit. You can throw away 100% of their complex AspNetCore libraries in favor of minimal API integrations. You can do everything your way and run it wherever you want.

The entrapment in the Microsoft ecosystem is of a substantially different nature than entrapment in the Java ecosystem. Becoming mired in Microsoft licensing concerns is a matter of technical competence. Becoming mired in Oracle licensing concerns is a matter of business competence.

Instead, I just don't use Microsoft's stack, and install OpenJDK. That floats my boat for my "Enterprise Language for long-haul trucking" needs.

The other thing I do is being able to use multiple languages and using the right one for the job, and ensure that all are supported by GCC suite.

Well, I'm on a very different niche than many software developers here, but at least it gives me more freedom to do what I want to do, and how I accomplish these.

C# is open and alternative implementations like Mono exist.
Mono is just a side project of Microsoft. A commoditized alternative to Microsoft's toolchain.

Miguel was conned into believing that it'll be completely independent like OpenJDK, but it didn't turn out like that.

IOW, C# is as open as VSCode.

OpenJDK is a side project of Oracle, too.
Not really. Plus, Red Hat Software, MS, Apple, Amazon, IBM, SAP are all developers for OpenJDK, as well as contributions from other major firms.
does it have an open source debugger yet?

https://isdotnetopen.com/

You forgot the JVM (and the tools built around it, so for example you can monitor / profile your app in production etc), and the massive galaxy of 3rd party libs that is the Java ecosystem.

Whether you like Java (the language) or not, Java (the ecosystem) will not go away. In fact, it is alive and well, and I would guess it is at least an order of magnitude bigger and more mature than the .net ecosystem.

If you don't like Java (the language), you can choose Kotlin (Java++), Scala (Haskell--), or other languages (eg. Groovy?)...

> 3rd party libs

A lot of this is the inertia I alluded to. There's no reason this couldn't all be written in C#. Kind of like the C++/Rust debate.

> There's no reason this couldn't all be written in C#.

There's no reason it couldn't be written Brainfuck.

doesn't mean it's a good idea

That's quite an exaggeration. The JVM philosophy is different from .NET's, even though there is a large overlap with them being VM based languages. C# has gotten too complex as a language, with so many features. C# also exposes lower level constructs, whereas the JVM tries to do a lot of different optimizations instead. The JVM has the best GCs in the industry, and the best monitoring and observability through JFR.
> C# has gotten too complex as a language, with so many features.

I really wouldn't say so. All the new features are convenient and easy to understand, especially if you have Visual Studio to teach them to you (type if (x == null) x = new .. and you get a popup to transform it into the new operator). It's not a zoo like C++.

Compare C#'s colored functions to Java's Loom. .NET has only one GC implementation, so if it doesn't work for your use case (low latency), you have no choice but to migrate to a different platform.
To be fair, I think they get around the lack of GC choices by rewriting slow paths to code that uses value types and low level code.
Except for the size of the respective ecosystems, the performance of the runtime and longevity guarantees.
I don't get how you can't see your in the same sinking boat of tech?
I sadly only get to use C# for side projects and the Unity3D game I contribute to. Work is all Java which is where my perspective comes from.
Except it's not really a sinking boat. Both the JVM and .NET are doing quite well.