News for hackers. Stuff that matters.
Re:Trying New Programming Languages Helped Me Grow as a Soft... by cplusplusfellow on Sunday October 16, 2022 @10:29AM (#33223850)
The reason why I’m not adopting C# is because I’m never going to be a windows user.
Re:Trying New Programming Languages Helped Me Grow as a Soft... by hardware2win on Sunday October 16, 2022 @10:35AM (#33223896)
It works on Linux just fine
Re:Trying New Programming Languages Helped Me Grow as a Soft... by ok123456 on Sunday October 16, 2022 @02:48PM (#33226116)
Problem is the mono C# compiler is several years behind Roslyn in terms of features. It's pretty much a non-starter if you don't have nullable types in 2022.
Re:Trying New Programming Languages Helped Me Grow as a Soft... by Jtsummers on Sunday October 16, 2022 @03:08PM (#33226295)
https://dotnet.microsoft.com/en-us/download

Works fine on non-Windows systems (well, Linux and macOS at least) IME and isn't several years behind.

Re:Trying New Programming Languages Helped Me Grow as a Soft... by hardware2win on Monday October 17, 2022 @03:06AM (#33230560)
Dont use Mono

Also I think you are giving nullable ref types too much credit

Re:Trying New Programming Languages Helped Me Grow as a Soft... by ok123456 on Monday October 17, 2022 @09:59AM (#33233590)
I don't think you're giving them enough credit.

Having the type system be able to tell you that you may have a null reference exception in a complicated code base is magic. I've inherited bad code bases and refactored them to use nullable references and watched lots of bugs fall out.

Re:Trying New Programming Languages Helped Me Grow as a Soft... by hardware2win on Monday October 17, 2022 @04:04PM (#33238838)
I'd rather use Result<T> everywhere
Re:Trying New Programming Languages Helped Me Grow as a Soft... by becquerel on Sunday October 16, 2022 @11:02AM (#33224098)
I've been coding .NET on linux fulltime for multiple years now.
Re:Trying New Programming Languages Helped Me Grow as a Soft... by smaudet on Sunday October 16, 2022 @11:03AM (#33224107)
.net core is not Windows only - works on the big three (linux mac windows).

That said, I get where you are coming from - .net framework is pretty much just windows, and there a large number of libraries/apps that are Windows first, other platforms second.

If you do end up needing to do Windows dev, though, I'd recommend it, same as if I were doing Apple Dev I'd recommend Objective C/Swift, or recommend you brush up on bash/zsh/fish, C and maybe Xorg/Systemd for linux.

You can use other languages on all these platforms but the 'native' toolkit tends to enjoy better interop and have better support.

Re:Trying New Programming Languages Helped Me Grow as a Soft... by oriolid on Sunday October 16, 2022 @11:54AM (#33224563)
The other big C# ecosystem is Unity Engine with its own frameworks and plugins. It lags a bit behind Windows, and might be one reason why some C# developers seem to be behind the times when it comes to new language features.

Edit: The other reason Unity developers are careful around new language features is avoiding memory allocations. When you write C# like it was Java it's more straightforward to see where allocations happen but it's all too easy to accidentally write allocations in your main loop if you use everything the language has to offer.

Re:Trying New Programming Languages Helped Me Grow as a Soft... by CyanLite2 on Sunday October 16, 2022 @11:08AM (#33224143)
And this is the problem OP is talking about. Outdated thinking from a 15 years ago is how cargo cults hold onto all the power.
Re:Trying New Programming Languages Helped Me Grow as a Soft... by phillipcarter on Sunday October 16, 2022 @11:17AM (#33224218)
This comment is about 7 years out of date.