Lately I’ve been reading a lot about functional programming principles and how they (of some of them) can be applied in C#. So I came across Language-Ext and CSharpFunctionalExtensions (as well as a few smaller ones). I briefly tried Language-Ext and am liking what I see, but haven’t tried the other. I know there’s always F#, but I want to explore other options as well.

I’d love to hear about other people’s experiences with those libraries (or similar ones). What do you like about them and what don’t you like?

  • moroni
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    I’ve tried a few different packages before, including the ones you mentioned. However, in the end, I decided to build my own data structures. It was actually pretty fun to create them based on my own preferences, and I learned a lot about functional concepts along the way.

    But to be honest, I rarely use them nowadays. The thing is, C# wasn’t really designed to be a functional language from the start. So while I could incorporate some functional concepts, the implementation never quite matched up to what you would find in a true functional language. Plus, the language can be pretty verbose, which kind of gets in the way.

    This experience was a couple of years ago though, and I know that C# has improved a lot since then. So it’s definitely possible that my experience today would be different.