1. 15

  2. 4

    I’m quite pleased with the syntax they’ve chosen. I think it will do an effective job of lowering the cognitive overhead of FP principals for developers of C-like languages. For instance, I love that, in the tuple syntax, they seem to be forcing you to write out both the type as well as the name:

    var ll = new (double lat, double lon) { lat = 0, lon = 0 };

    When Java developers see my Scala code, they tend to point at usages of tuples and say things like “hey! it’s not readable!”. I imagine the bulk of C# developers feel the same way, so this is probably a necessary decision to make C# developers feel comfortable with the new syntax. I know for certain that this will rub many Haskell developers the wrong way (and they have good reasons), but this I think they’ve made the correct decision for C#.

    On the same note, I also think using switch/case/break is actually the correct decision for the same reasons (familiarity). Also, the way they implement custom destructuring/pattern matching is different, but overall seems like a very C#-way to do this.

    I’m very excited to see how the language is developing. More and more, it seems like the perfect platform to express the benefits of FP while (mostly) avoiding the elitist side.

    1. 3

      I am just starting to get into c# professional and privately. The progress the language had made is very exciting, especially when compared to Java.

      1. 1

        Glad to see pattern matching, but I’m a little disappointed to see case/break syntax for it.