Hacker News new | ask | show | jobs
by tomkarho 658 days ago
> It's fully-cross platform

To a point. Making cross platform native desktop apps is still in the hands of 3rd party vendors such as Avalonia and Uno. MAUI was supposed to fix that oversight to a less than stellar results.

1 comments

That is like saying C is not cross platform because there is not a library for making desktop apps that use native components on all those platforms.
If there were an old version of C that only worked on one platform but had a graphical toolkit in its standard library, and a new version of C that is cross platform but that graphical toolkit is now ambiguously still sort-of part of the standard library but still not cross platform (and there was no realistic alternative)... Then yes it would be valid to object C is not really cross platform.
back when .NET was first launched it was advertised as the new way of making desktop applications on Windows. Visual C# made it very easy to design GUI interfaces.

So this "it's all for backend now" notion is surprising.

.Net is "Microsoft Java". Like Java it was designed to do everything, but as desktop development died (and mobile development was locked down by Apple and Google, limiting it to their corporate languages), it pivoted towards networked applications.
Visual J++ was Microsoft’s Java
They were legally forbidden from going the Embrace-Extend-Extinguish route there, so they had to build their own version from scratch. C# exists because J++ couldn't.
Same with java - designed for embedded set top devices, pivoted to backend services.
.NET/C#'s competitor JVM/Kotlin does provide a UI framework (Jetbrains Compose) that runs on iOS, Android, Windows, Mac, Linux, and the web.

That's what you have to compare against, and .NET/C# falls flat.

That's also not part of the JVM or the Java language.
Jetbrains is a third party vendor here, too.
A third party vendor for the Kotlin language? Kotlin has replaced Java as C#'s largest competitor, so that's what we should be comparing against.
> Kotlin has replaced Java as C#'s largest competitor

Er, I don't think this assertion is backed by data. See for example https://pypl.github.io/PYPL.html

Is Kotlin the most "active", "hot", or "up-and-coming" competitor? Possibly. But the "largest"? Its deployed footprint and popularity are nowhere close to Java's at this point in time.

No and it's not even close. Kotlin only has a single Jetbrains Compose (I presume Kotlin Multiplatform is the same thing). It is also subject to the quirks and specifics of JVM implementations, build-systems and package management. Kotlin native partially bypasses this, but its performance is a factor of 0.1-0.01x vs OpenJDK (if there is new data - please let me know). This is very unlike NativeAOT which is on average within 90% of CoreCLR JIT but is also a performance improvement in variety of scenarios.

C# and F# get to enjoy the integration that is "much closer to the metal" as well as much richer cross-platform GUI frameworks ecosystem with longer history.

Which rich cross-platform GUI frameworks are you talking about?

Win32? Silverlight/Blend? XAML? MAUI? They're all windows only.

Gtk? Qt? Sure, they exist, but they're ancient and limited to long outdated paradigms.

I don't know if you can get QtQuick with KDE Kirigami to work on .NET, otherwise that might be one option.

Kotlin Multiplatform is btw a solution for building the same code for kotlin native, JVM and web to target all the OSes at the same time.

While Jetpack Compose is the Android Version of Compose, Compose Multiplatform is Compose for Kotlin Multiplatform.

> subject to the quirks and specifics of JVM implementations, build-systems and package management

That's a massive advantage over the arcane package management and build systems of .NET

Very few languages ever achieve a build and package management system as mature and usable as the Java ecosystem.

I've been waiting for 12 years for .NET to match Java's ecosystem, and it's still not there yet.

There are more than 10 sibling and gp comments that exhaustively address the GUI and other questions :)

> That's a massive advantage over the arcane package management and build systems of .NET. Very few languages ever achieve a build and package management system as mature and usable as the Java ecosystem. I've been waiting for 12 years for .NET to match Java's ecosystem, and it's still not there yet.

If you want to sell me on "advantages" of invoking Gradle or Maven over

    dotnet new web
    dotnet run
    curl localhost:port
or

    dotnet new console --aot
    echo 'Console.WriteLine($"Right now is {DateTime.Now}");' > Program.cs
    dotnet publish -o {here goes the executable}
or

    dotnet add package {my favourite package}
I suppose you would actually need 12 years of improvements given how slow if ever these things get resolved in Java land.

Also, what's up with Oracle suing companies for using incorrect JDK distribution that happens to come with hidden license strings attached?

> {my favourite package}

Well, that's where the problem lies, isn't it? The ecosystem for .NET is extremely limited compared to what's available for the JVM

And the way JVM packages are distributed, with native libraries, BOMs and platforms allows more versatility than any other platform.

The build system may be better in dotnet, but that only really matters for the first 10 minutes. Afterwards, the other tradeoffs become much more important.

> Which rich cross-platform GUI frameworks are you talking about? > Win32? Silverlight/Blend? XAML? MAUI? They're all windows only.

MAUI is not windows only. I have a MAUI app on my android phone. Cross-platform? yes. Rich? Now, I wouldn't call it that.

> NET Multi-platform App UI (.NET MAUI) apps can be written for the following platforms:

> - Android 5.0 (API 21) or higher is required.

> - iOS 11 or higher is required

> - macOS 11 or higher, using Mac Catalyst.

> - Windows 11 and Windows 10 version 1809 or higher, using Windows UI Library (WinUI) 3.

Okay, where's Linux? That's what Mono was originally made for and where Mono really shines.

Also, the development experience isn't great either:

> - If you are working on Linux, you can build and deploy Android apps only

> - You need a valid Visual Studio or IntelliCode subscription

The getting started guide only exists for Windows and macOS and the forum post announcing experimental Linux support is full of caveats.

I don't think you and I would agree on what "cross-platform" means, especially in the context of Mono being donated to Wine, which is a heavily linux-centric discussion topic.