What is an example of a really good codebase written in modern C#? There are quite a few appealing things about the language, but I'm having trouble shaking the feeling that it's kind of like Java. I know both languages have evolved a lot, but some codebases might get stuck in some old patterns.
Welcome to C# 9.0
191–196 of 196 posts
Re: Welcome to C# 9.0
#192Look - I don't have anything deep to say here. I can only say that between 'records' and 'with-expressions' now in C#, I as a hobbyist F# developer feel like I'm being shaken down by the mafia. C# designers: "Hey, nice language features you have there. I'll just borrow them for a bit ok, it'll be fine..." Later, C# programmers: "why would I learn F#, C# does all the same stuff!" (even though it doesn't) Edit: I admit…
Put another way: if I'm going to use these features anyway (hint: now that they're in C#, I am) why wouldn't I do it in the language designed around them, rather than the one where they are bolted on?
When C# didn't have these features, there was ironically more reason to use C# because then these idioms could be argued to not be accepted by the community to the same degree.
Re: Welcome to C# 9.0
#193> " Top-level programs " I'm not usually one for causal dismissals but that made me cringe. What on earth is the use case for getting rid of that tiny bit of boilerplate, relative to the complexity it adds to the language definition, that makes it worthwhile?
In C# I'd like to able to : - declare a namespace for the file (no indentation) - declare that the file is a class and can only contain one (top level) class (still no indentation) - `using` statements that don't import every symbol into my namespace : using System.Console; ... Console.WriteLine(); instead of : using Sytem; ... Console.WriteLine(); // where does "Console" come from ? god/IDE only knows But yes, no to…
Re: Welcome to C# 9.0
#194As much as I love F#, C# now has enough of F#'s core features that I'll probably use F# less due to the better tooling for C# code. (Resharper, Ozcode, etc.) C# still needs DU's though... Meta-programming support is kinda better if F#, but isn't great in either language unfortunately - you could argue the as C# is based on Rosyln that it is actually better.
Re: Welcome to C# 9.0
#195I would like to know what is the future of Mono now that dotnet core is crossplatform and Microsoft bought Xamarin. Mono remains the best (only?) solution to call C# from C++ in a crossplatform way using embedding.
Well, Mono is now one of the two .NET runtimes shipped with .NET 5+. Like you mentioned, it is better for embedded and porting. That the reason they I integrate it. Mono as a project is a dead man walking. And honestly, that is good. Unity as the major other user is surely heading for .NET 5. I would suggest to learn to embed .NET Core 3.1 and later .NET 5. Surely possible (see Unity, interop with WinRT etc, ..).
Re: Welcome to C# 9.0
#196Earlier quoted context omitted.
Well, Mono is now one of the two .NET runtimes shipped with .NET 5+. Like you mentioned, it is better for embedded and porting. That the reason they I integrate it. Mono as a project is a dead man walking. And honestly, that is good. Unity as the major other user is surely heading for .NET 5. I would suggest to learn to embed .NET Core 3.1 and later .NET 5. Surely possible (see Unity, interop with WinRT etc, ..).
How is that a good thing? Isn't it reminiscent of embrace, extend, extinguish?
.NET 5 is MIT licensed and even gets attention for source focused builds (like needed by Linux distros). Redhat officially ships is own version. Summary: that is exactly not EEE.