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.

  • ThirdConsul@lemmy.zip
    link
    fedilink
    arrow-up
    6
    ·
    1 day ago

    Could you define what you mean by functional and ooo in practice, because to many people in pracitce functionsl is a garbage monad wrapper over anything with unreadable, undebugable code whose only purpose is to hide if else statements… and it doesn’t even do that; while ooo is java factory of factoties mixed with aspect programming and 20 levels of inheritance.

    • PortNull@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      22 hours ago

      No classes, no mutable types, pure functions where possible (I/O functions exist). I like elixir myself. I use for loops or recursion depending on which is suitable and most understandable. I like the pipe operator because I’ve gotten used to chaining inputs and outputs like that from Linux CLI.

      I prefer functional programming, but also use OO, each their own, but i prefer functional and find it better to write and read

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

        Okay, so… Method chaining, and no refs being passed as params, and structs.

        I dislike pure functional programing (not the same as pure functions) because of the boilerplate you need. Want to add a cache? Add a state monad throught the whole pipeline.

        Want to have readable code in a six month? Forget it, because you’re gonna write in point free style, compositiona without naming inputs and outputs, so that the next time you visit this place, you’ll have to check every function for them.

    • wewbull@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Not Op but…

      OO languages have classes with inheritance based polymorphism. I don’t see struts + methods as enough to qualify.

      Functional languages have functions which can take functions as arguments and function composition as first class features.