• @[email protected]
    link
    fedilink
    378 months ago

    No, actually C#'s answer should be: “What Java said - hold on, what Python said sounds good too, and C++'s stuff is pretty cool too - let’s go with all of the above.”

    C#, or as I like to call it “the Borg of programming languages”.

    • @[email protected]
      link
      fedilink
      108 months ago

      I got my first software developer role last year and it was the first time I’d written C#, I was more TypeScript. Now we use both but I must say I really like C# now that I’m used to it.

      • @[email protected]
        link
        fedilink
        68 months ago

        I think most programmers would like C# if they spent time with it. It is getting a bit complex because the joke about it over borrowing from other languages is on the money. It is a nice language though and pretty damn fast these days all things considered.

        • @[email protected]
          link
          fedilink
          18 months ago

          There’s too much MS in the language and runtime for me. The fact that it gives my Linux programs DLL files and the fact that by default the SDK phones home makes me run away in horror from not only writing it but also running other projects written in it.

        • @[email protected]
          link
          fedilink
          18 months ago

          What does it offer that would make it better? Just curious and I’m not in a position to change out tech stack at work though.

          • @[email protected]
            link
            fedilink
            2
            edit-2
            8 months ago

            The biggest selling point about functional languages for me is the type system, mainly algebraic/union types (which imo Scala does the best), pattern matching (and imo Rust does this best), and the incredible type inference, but also all the functional features. But I think the best part about F# specifically comparing it to C# is the removal of a shit ton of the boilerplate. Plus data is immutable by default, always a nice touch.

            For F#, the special types may not be super relevant when interacting with C# libraries, but in general you can do everything in F# that you can do in C#, including all the OOP. It’s just an added bonus that you basically get enums on steroids and pattern matching.

            I find that writing in F#, even if I write basically the same code I would in C#, speeds up my design/programming a TON and makes it significantly more maintainable and easy to navigate. There’s a lot less clutter and you don’t have to worry about the layers upon layers of repetitive boilerplate.

            The only downside IMO is that F# can have some terrible error messages. And of course, you have to learn F# syntax which can be a small pain if you’ve never used ML or Haskell (especially when it comes to function call syntax). But if you’re mainly interfacing with C# libraries then it’s no big deal. I started making an application only utilising C# libraries (mainly DB stuff) the same day I started using F# and it went relatively smoothly, although probably because Rust is the main language I used then.

            This resource might help, although I can’t say it’s enough to completely learn the language: https://fsharp.org/learn/