4 ms·
True. I really appreciate Don Syme for not adding too much to F#. It's a beautiful precise language as it is. I really don't like what has happened to C# is th
by JaggerJo 4y ago
True. I really appreciate Don Syme for not adding too much to F#. It's a beautiful precise language as it is.
I really don't like what has happened to C# is the past few years where features are just added blindly it seems. Current C# looks nothing like C# code from a few years ago and that's bad IMO.
- wizofaus 4y agoExample? The biggest addition to C# recently is non-nullable references, which was long overdue even though I haven't had a proper opportunity to use yet, but they don't even change the syntax of the language.
- pjmlp 4y agoYou missed the pattern matching, default interface methods, records (class and struct based), and all the low level features to be able to write C++ like code in C#, code generators, global usings, implicit main class, static lambdas, abstract interface methods for operators,.... On the horizon, discriminated unions are still being talked about, and more C++ performance like features.
- deleted 4y ago[deleted]
- JaggerJo 4y agoI bunch of stuff was added in the recent years. Just a few examples: Pattern Matching https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#more-patterns-in-more-places https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... Non destructive mutation https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#nondestructive-mutation https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... Null-coalescing assignment https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#null-coalescing-assignment https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...
- rattray 4y ago(your last link should have been https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#null-coalescing-assignment https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...) I don't work in C#, but I must say, these seem like great features to me, and not too crufty/bloaty at all. Scrolling through the other recent feature additions, they all look like things that would make a language feel smoother rather than more noisy. But again, IANAC#D.
- JaggerJo 4y agoMight be just me, but in larger teams it's annoying because not everyone knows the most recent features. I wrote C# daily before I switched to F# ~3 years ago and I sometimes struggle reading "modern" C# code. In C# you now often have multiple ways of doing the same thing.
- wizofaus 4y agoPattern Matching was 5 years ago (and I use it all the time, it's great). I have to admit I've not come across many C# 9.0 features in the wild yet, and I might double take if I saw them used liberally throughout a codebase. The null-coalescing assignment I'm a bit skeptical about the value of, or at least, it doesn't fit with my preferred style of coding (sticking to non-nullable types where possible, and generally avoiding variable reassignment).