1. 20
  1.  

  2. 7

    While most changes look handy to me and do address pain points I had while I was using C# earlier, still the whole language is getting more and more baroque, and that is not good in my opinion.

    At least most of these changes help write cleaner code, not like the “zomg gotta go fast” changes of earlier versions, which targeted Unity users.

    1. 3

      Which changes were the “zomg gotta go fast”-changes?

    2. 5

      I work in a .NET team that is very skilled and intelligent but defaults to C# (not that these are opposites in any way). I love these fsharpifications of C#, but perhaps not for the reasons one may think.

      With C# 6, I have practically no leg to stand on when I want to use F#. A teammate can say “I’m not prepared to learn the various F# idioms to appropriately work on your code. Please use C# for the implementation.” I didnt really have a strong counter-argument there.

      With more modern C# versions, I can essentially say, “Look, these idioms are part of C# so you’ll have to learn them eventually anyway. I might as well use F# for the implementation and we’ll get a head start on these things.” And that has turned out to be an argument that’s hard to refute.

      Edit: and why would I want to use F# when the rest of the team is reluctant to? I honestly believe it can be a competitive advantage. Obviously I don’t have any strong data to back this up, so I can’t use that as an argument.

      1. 6

        I’m learning F#, and it feels simpler, cleaner than C#. Many of the good parts are in C# already, but without convenient sum types C# is still inconvenient for me for many usecases.

        I also find the explicit serial compilation and scoping better.

        What I really miss in both C# and F# is sub-typing (type narrowing) of ADA for primitives, to be able to avoid primitive obsession without extensive boilerplate. This need arises for me almost every week, but usually I just go with primitives. See: https://en.wikibooks.org/wiki/Ada_Programming/Type_System#Derived_types

        1. 3

          Yes, you and me both. Ada is such a well designed language and I wish more would take after it.

      2. 3

        At this rate, C# 10 will be indistinguishable from F#! Although it’s weird that (per the top comment reply) records are only officially supported in .NET 5, when they don’t appear to be anything special compared to F# records (which evidently work fine currently). I hope that means F# records will have first-class runtime support in .NET 5, rather than there being two different-yet-identical record implementations.

        1. 1

          I think you are too optimistic. Maybe in .NET 7 :)