I still think C# is one of, if not the best of designed languages exist. Even it moves in much smaller steps than it was before I think it's for good. I left .NET land at 6.0 and .NET 4.x versions mostly because of Windows eco-system (small open source community, almost no alternatives to out of the MS things, bad linux support). Since that I've been working with Java, Swift,JS, Python, Golang and I still think that…
Welcome to C# 9.0
41–50 of 196 posts
Re: Welcome to C# 9.0
#42Earlier quoted context omitted.
This made me chuckle. I think it's broader than C# -> F# though. Java also has closures and higher-order functions, and in many debates on this forum it seems like OOP proponents aren't aware that these features are grafts from functional programming. OOP programmers also seem to have (finally) come around to the consensus that composition is preferable to inheritance. So if there is a long con, I think it is about t…
yeah for composition - I ALWAYS liked it much better!
class Foo(b: Bar) : Bar by bRe: Welcome to C# 9.0
#43How does the .NET ecosystem fare these days compared to Java's? Whatever the differences between the languages, on the surface of things it looks like one must be insane not to use Java: https://projects.apache.org/projects.html?language
You'd be insane because a major Java project maintainer contains a lot of Java..? That's like pointing at Microsoft's github repo and saying you'd be insane to use anything but C# and TypeScript. Personally I think this is a better source: https://octoverse.github.com#top-languages Or this: https://insights.stackoverflow.com/survey/2019#technology
Re: Welcome to C# 9.0
#44Earlier quoted context omitted.
.NET ecosystem is large, but still windows-centric. If I was choosing between java and C# for a startup, I'd definitely consider C# because it does seem to be a better java (properties and LINQ are the first 2 things that come to mind). But realistically if you're not doing .NET on windows, you're still an early adopter who's going to run into weird issues that you won't have to deal with on java.
The point of C# being a better Java is nowadays mostly obscolete because of Kotlin being THE better Java. As for LINQ see https://github.com/mythz/kotlin-linq-examples/blob/master/RE...
I love Kotlin and I don't really get a hankering for LINQ when I'm using it, but I wish people would stop trying to say "but we can do that too!" when they really can't.
Re: Welcome to C# 9.0
#45Earlier quoted context omitted.
Because Scala takes mind-boggingly long to compile. Because Scala has so many features that anything has at least 3 different ways to implement it. Because it’s very easy to write unreadable code in scala, not so much in C#. Because Scala uses JVM, while C# has access to .NET (yes this is an advantage for many developers).
All your points except the last one do not apply to Kotlin
Re: Welcome to C# 9.0
#46> " 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?
- 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 top-level programs.But alreay with these few changes, I've saved 10% of the 80 columns width. I've made it easy to read a file without an IDE. You can start to write actual code at indentation level 0. I've made it easy to have one class per file and hard to have two class per file, in the spirit of making good pratice easy and bad practice hard.
Re: Welcome to C# 9.0
#47What is the winforms simple (ie, drag and drop form designer, click through for code) current windows development recommendation. I've seriously lost all track of how to just get up and going. I've tried UWP/WPF etc - they felt like a bit of nightmare for quick and go, but the tooling now seems to have dropped winforms? I couldn't get the form designer to actually show up even on a WinForms project?
Re: Welcome to C# 9.0
#48Damn, this is fantastic. One big syntactical thing I should really put in a proposal for is null-conditional returns. Turning if(foo != null) return foo; Into return? foo; It fits perfectly with the existing null coalescing operators and such, while really cleaning up a lot of code.
Re: Welcome to C# 9.0
#49What is the winforms simple (ie, drag and drop form designer, click through for code) current windows development recommendation. I've seriously lost all track of how to just get up and going. I've tried UWP/WPF etc - they felt like a bit of nightmare for quick and go, but the tooling now seems to have dropped winforms? I couldn't get the form designer to actually show up even on a WinForms project?
I'm no longer close to .NET desktop GUI development but even today, if I had to do something I'd start a new WinForms project.