Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

  • marcos@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    15 hours ago

    Linq

    AKA - We have Monads at home…

    Rust is really missing something like do syntax. It’s half-way there with the semicolon and question marks, but it’s missing an idiom for .map_or_else and to generalize the thing to work with a trait.

    • ThirdConsul@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      9 hours ago

      AKA - We have Monads at home…

      Thats not the linq purpose. Though it is technically a monad, its purpose is not hiding side effects or managing an async flow, or managing nulls/errors, but query, filter, map data from an enumerable.

      If you use Linq as a replacement for Option, Either or Maybe you’re doing something wrong.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        If you use Linq as a replacement for Option, Either or Maybe you’re doing something wrong.

        Yeah, exactly, it’s a replacement for List.