News for hackers. Stuff that matters.
Re:Asynchronous Programming in C# by nkozyra on Tuesday April 30, 2024 @06:40AM (#40209448)
It still has some platform dependency that Mono or .Net Core doesn't fully solve.

It's a very pleasant language to work in, especially compared to Java, but there are so many other really nice C adjacent languages in the field that it's hard to argue for if you're not in that ecosystem.

Re:Asynchronous Programming in C# by virtue3 on Tuesday April 30, 2024 @06:58AM (#40209572)
I think that might have been the case a while ago but they have even dropped .net-core and it's now just .net and cross platform.

It appears to have been the case since .net 5 (2020) (I've also stopped paying attention to MS a bit before then).

"Yes, .NET 5 is cross-platform and can be installed on Linux, Mac, and Windows. It aims to provide a consistent development experience across platforms by unifying different .NET flavors, including .NET Core, .NET Framework, .NET Standard, and Mono. .NET 5 also aligns all frameworks to support a common set of APIs, making it easier to build cross-platform libraries."

Re:Asynchronous Programming in C# by toyg on Tuesday April 30, 2024 @07:03AM (#40209618)
Yeah but the way they've done it, iirc, is by cutting libraries out of Core that really should be in there. I remember looking recently at some pretty basic stuff that broke in 6, simply because for some reason the relevant APIs (which were pretty low-level and not really related to anything driver-specific) were marked as Windows-only and ripped out of Core and Host packages.

So in theory it's all independent but in practice the best bits are still on Windows.

Re:Asynchronous Programming in C# by nkozyra on Tuesday April 30, 2024 @07:35AM (#40209864)
This was my experience trying to rewrite a service about a year ago.
Re:Asynchronous Programming in C# by smaudet on Tuesday April 30, 2024 @09:49AM (#40210936)
It has been amusing watching them try to get cross platform going, I used to hear how they (c#/.net) did such a good job with backwards compatibility, however Java had been doing crazier platforms for longer and their cross platform/backwards compat is in a much better state... although they are much more difficult to use to integrate deeply with a system.
Re:Asynchronous Programming in C# by davidfowl on Thursday May 02, 2024 @02:27AM (#40233278)
What stuff was that?
Re:Asynchronous Programming in C# by neonsunset on Tuesday April 30, 2024 @06:58AM (#40209573)
And C# is the nicest of them (because other options are worse in one aspect or another, especially performance).
Re:Asynchronous Programming in C# by vsnf on Tuesday April 30, 2024 @07:01AM (#40209601)
There are many metrics by which C# is the nicest language, but after 10+ years of doing (and loving) C# development, I find that I prefer Dart as a C#-like language these days.
Re:Asynchronous Programming in C# by alkonaut on Tuesday April 30, 2024 @07:17AM (#40209723)
What dependencies/limitations are that?
Re:Asynchronous Programming in C# by keltex on Tuesday April 30, 2024 @08:06AM (#40210102)
The biggest one I've run into is GDI support (Graphics Device Interface). This covers things like two-dimensional vector graphics, imaging, and typography. So simple things like transforming or drawing images are no longer supported.

There are decent third party open-source libaries like SixLabors/ImageSharp that have stared to fill the gap.

Re:Asynchronous Programming in C# by alkonaut on Tuesday April 30, 2024 @10:24AM (#40211249)
System.Drawing was always just a wrapper for GDI(+), and you CAN use it on Linux via using System.Drawing.Common which is a wrapper for GDI+ (Windows) or something else like libgdi+ on non-windows. It works - but it feels more like a compat hack than anything else. System.Drawing wouldn't look the way it does if it wasn't designed to be a Windows only API around GDI+. ImageSharp was always a good lib but now the license was murdered. Hopefully a true OSS fork will come along. SkiaSharp is also a good alternative, especially if you also need the drawing bits.

Missing a Graphics Library in .NET (5-8) is just half the story. It's of course missing an entire UI library too. But Microsoft, perhaps wisely, chose not to also implement a whole xplat UI library. Avalonia/Uno/etc are already there.