It feels like anything is mowed down on the internet. I’ve been a dev for a long time too, and I never feel sure when I chose a stack for a new toy project (in my day job I rarely get to chose, so that’s a non issue there)

  • Kogasa
    link
    fedilink
    6
    edit-2
    10 months ago

    The 2 that I struggle with on a daily basis:

    • missing discriminated unions. Third party libraries kind of sort of fill the gap, but it’s a pain point.

    • a flawed async programming model. Namely, there are multiple models (for historical reasons / backwards compatibility), and the more current one (task-based) throws a wrench in your ability to effectively design interfaces, functions, delegates etc. that can be shared between synchronous and asynchronous code. Green threads would have fixed this, at the cost of some other potential issues, but it looks we’re stuck with tasks for now. Also, there is the awkwardness of needing to constantly use .ConfigureAwait(false) after every await, unless you shouldn’t (e.g. in the UI thread), and if you get it wrong you might cause a deadlock in your app but not in a console app… A bit confusing and easy to mess up.

    • @Elderos@lemmings.world
      link
      fedilink
      110 months ago

      I really like ReactiveX for async programming, though having to go through a library is definitely a pain. It also does not make it less awkward to design your public API unless you’re okay exposing Rx types. Fair points!

    • mavnn
      link
      19 months ago

      F# will give you discriminated unions and do-notation (it calls it ‘computational expressions’) while retaining full access to the .net ecosystem.